Reference Guide for the network CLI?

If you're new to FAH and need help getting started or you have very basic questions, start here.

Moderators: Site Moderators, FAHC Science Team

Post Reply
madfordmac
Posts: 3
Joined: Thu Apr 02, 2020 6:06 am

Reference Guide for the network CLI?

Post by madfordmac »

I'm just installing folding at home on a few of my systems. As I was having a little fun troubleshooting the network config for a remote FAHControl, I discovered that the network socket seems like it's actually a little CLI. I'd like to add some monitoring of F@H into my Nagios and/or Elasticsearch systems, and this seems like a potentially good way to get that data. Is there a reference guide for that interface? I tried the obvious "help" and "?" and there doesn't seem to be integrated help.
uyaem
Posts: 219
Joined: Sat Mar 21, 2020 7:35 pm
Location: Esslingen, Germany

Re: Reference Guide for the network CLI?

Post by uyaem »

Code: Select all

fahclient --help
prints a LOT of information for me, maybe that contains something you could use?
Image
CPU: Ryzen 9 3900X (1x21 CPUs) ~ GPU: nVidia GeForce GTX 1660 Super (Asus)
ChristianVirtual
Posts: 1576
Joined: Tue May 28, 2013 12:14 pm
Location: Tokyo

Re: Reference Guide for the network CLI?

Post by ChristianVirtual »

You can Telnet on port 36330 and remote control quite easy that way. Might be easier to integrate in external systems.
ImageImage
Please contribute your logs to http://ppd.fahmm.net
madfordmac
Posts: 3
Joined: Thu Apr 02, 2020 6:06 am

Re: Reference Guide for the network CLI?

Post by madfordmac »

@ChristianVirtual: Exactly, but what are the commands you can use there?

Edit: @uyaem: The help from the client doesn't seem to have info on the network protocol.
uyaem
Posts: 219
Joined: Sat Mar 21, 2020 7:35 pm
Location: Esslingen, Germany

Re: Reference Guide for the network CLI?

Post by uyaem »

Yeah, sorry, I think i read your question wrong :)
Image
CPU: Ryzen 9 3900X (1x21 CPUs) ~ GPU: nVidia GeForce GTX 1660 Super (Asus)
ChristianVirtual
Posts: 1576
Joined: Tue May 28, 2013 12:14 pm
Location: Tokyo

Re: Reference Guide for the network CLI?

Post by ChristianVirtual »

madfordmac wrote:@ChristianVirtual: Exactly, but what are the commands you can use there?
Log in there, use 127.0.0.0 for no password and then I think “help” ...
Then a list of remote commands show up.
Basically around slot configurations, parameter settings, running workunits, the basic data for visualization.

Sorry, no FAHclient running right now but just telnet in and enter “help” or “h”

The main issue you might face is that the response comes in PyON format, not 100% JSON. Therefore are minor differences (e.g. with Boolean values).

I used that in my early years to connect to a zabbix Monitoring; and added temperature recordings from CPU and GPU ... was easy to do. But that Server is on the boneyard.
ImageImage
Please contribute your logs to http://ppd.fahmm.net
Joe_H
Site Admin
Posts: 8002
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Studio M1 Max 32 GB smp6
Mac Hack i7-7700K 48 GB smp4
Location: W. MA

Re: Reference Guide for the network CLI?

Post by Joe_H »

There is a page on the defined API for connecting to FAHClient - https://github.com/FoldingAtHome/fah-co ... Client-API
Image
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Reference Guide for the network CLI?

Post by bruce »

FACT: Both WebControl and FAHControl use this API to gather all the information they display and to make any changes they can make to the daemon FAHClient that's running in the background.
ChristianVirtual
Posts: 1576
Joined: Tue May 28, 2013 12:14 pm
Location: Tokyo

Re: Reference Guide for the network CLI?

Post by ChristianVirtual »

Joe_H wrote:There is a page on the defined API for connecting to FAHClient - https://github.com/FoldingAtHome/fah-co ... Client-API
Nice one, was looking for the old web page. This is better place
ImageImage
Please contribute your logs to http://ppd.fahmm.net
madfordmac
Posts: 3
Joined: Thu Apr 02, 2020 6:06 am

Re: Reference Guide for the network CLI?

Post by madfordmac »

Many thanks, @Joe_H! That is exactly what I was looking for. :)

There was one piece missing that I stumbled across an example to figure out and now I'm cooking with gas: If the client is configured for authentication, you must use the `auth <passphrase>` command before anything else will work, even help.
ChristianVirtual
Posts: 1576
Joined: Tue May 28, 2013 12:14 pm
Location: Tokyo

Re: Reference Guide for the network CLI?

Post by ChristianVirtual »

madfordmac wrote:now I'm cooking with gas: If the client is configured for authentication, you must use the `auth <passphrase>` command before anything else will work, even help.
In general yes, but i think via localhost you can skip; good for testing but sure later you need.
ImageImage
Please contribute your logs to http://ppd.fahmm.net
Post Reply