Before using Sysctl, the following are required:
Sysctl has an interactive mode. Note that only one node can be communicated with at a time in interactive mode.
To enter interactive mode, enter the sysctl client command without a command argument. For example, to use Sysctl in interactive mode on the local node, enter:
sysctl
If you issued the command from diane.kgn.ibm.com, you get the following prompt:
Sysctl (Version 1.1) on diane.kgn.ibm.com sysctl>
At this point, you can enter Sysctl commands.
You can also specify some of the Sysctl flags when going into interactive mode. For example, to use Sysctl in interactive mode for node redhook.kgn.ibm.com, enter:
sysctl -h redhook.kgn.ibm.com
Sysctl issues this response:
Sysctl (Version 1.1) on redhook.kgn.ibm.com sysctl>
In this example, if you enter svcversion and pdf, the interaction is as follows, where your actions are in bold:
sysctl> svcversion
1.1 sysctl> pdf
redhook.kgn.ibm.com: ======================================================== Filesystem Size-KB Used-KB Free-KB %Free iUsed iFree %iFree / 8192 5164 3028 37% 815 1233 61% /var 16384 4176 12208 75% 343 3753 92% /usr 552960 467888 85072 16% 23203 116061 84% /tmp 49152 23860 25292 52% 235 12053 99% /home 65536 63556 1980 4% 5375 11009 68% sysctl> quit
To exit the interactive mode, enter one of the following:
If no target nodes are specified on the Sysctl command, the command is sent to the server on the local node. For example, to send the whoami command to the local server, enter:
sysctl whoami
To direct a command to remote host sivle, use -h and enter:
sysctl -h sivle sys:info
The system response is similar to:
sivle.kgn.ibm.com power AIX 4.3.2
To direct a command to remote hosts sivle, and yelserp, enter:
sysctl -h sivle -h yelserp sys:info
The system response is similar to:
>> sivle sivle.kgn.ibm.com power AIX 4.3.2 << >> yelserp yelserp.kgn.ibm.com power AIX 4.3.2 <<
Multiple nodes can be targeted with a single Sysctl command. The collection of nodes can be specified in a file. Alternatively, the Sysctl command will read node names from stdin. In the following example, the file /tmp/node-file contains node names r05n13.hpssl.kgn.ibm.com, r05n15.hpssl.kgn.ibm.com, and r05n09.hpssl.kgn.ibm.com.
To direct the pdf command to the /tmp/node-file collection, enter:
sysctl -c /tmp/node-file pdf
The response in this example is the following:
>> r05n13 r05n13.hpssl.kgn.ibm-------------------------------------------------------- Filesystem Size-KB Used-KB Free-KB %Free iUsed iFree %iFree / 4096 3372 724 18% 792 232 23% /var 8192 6320 1872 23% 297 1751 86% /usr 335872 331632 4240 2% 17820 66148 79% /tmp 8192 520 7672 94% 67 1981 97% /home 4096 168 3928 96% 18 1006 99% << >> r05n15 r05n15.hpssl.kgn.ibm-------------------------------------------------------- Filesystem Size-KB Used-KB Free-KB %Free iUsed iFree %iFree / 4096 3364 732 18% 796 228 23% /var 8192 3028 5164 64% 281 1767 87% /usr 335872 331412 4460 2% 17825 66143 79% /tmp 8192 464 7728 95% 57 1991 98% /home 4096 168 3928 96% 18 1006 99% << >> r05n09 r05n09.hpssl.kgn.ibm-------------------------------------------------------- Filesystem Size-KB Used-KB Free-KB %Free iUsed iFree %iFree / 4096 3340 756 19% 790 234 23% /var 8192 3336 4856 60% 285 1763 87% /usr 331776 331012 764 1% 17742 66226 79% /tmp 8192 1212 6980 86% 58 1990 98% /home 4096 164 3932 96% 17 1007 99% <<