VIO Server command history using lsgcl
You'll pardon my dedicating two posts in a row to the VIO Server, but I had to share this one with my loyal readers.
You can get a history of all commands on the VIO server command line by logging in as padmin and running the command lsgcl. That's to list the Global Command Log. Here's an extract from one I've just run:
29 2010, 14:32:16 padmin lssp -detail -sp rootvg
Jul 29 2010, 14:32:16 padmin lsvg -pv rootvg -field pvname -fmt :
Jul 29 2010, 14:32:17 padmin lspv hdisk0 -field pvid size -fmt :
Jul 29 2010, 14:32:17 padmin lspv hdisk1 -field pvid size -fmt :
Jul 29 2010, 14:32:33 padmin lsmap -vadapter vhost3
Jul 29 2010, 14:32:42 padmin lsmap -all
Jul 29 2010, 14:32:53 padmin ioslevel
Jul 29 2010, 14:33:18 padmin lsgcl
The commands I ran are highlighted in blue, but the log also reports some commands it has invoked (shown in green) . When I ran the first command to list the storage pool details for rootvg, the VIO Server also ran lsvg -pv rootvg and then lspv for each of the disks in rootvg.
The global command log
The global command log might help if you want to understand a little more about command syntax on the VIO server. It gives a history of all commands, as the documentation for lsgcl command explains:
If something breaks on the VIO, your detective work is that much easier. When things go wrong, the important thngs is not always to find out whose fault it is (although that's nice, unless the fault is yours). It's more valuable to know:
- If something was done to break things - it may be hardware or environmental or evil influences outside the IBM Power system
- what was done
- how to fix it and
- how to prevent it happening again.
The global command line traces the footprints of users on the VIO server, but it may not be a complete history of every VIO server command ever:
So yes, it will be helpful finding recent commands if you need to play detective. If, on the other hand, you decide to pursue a career in script writing (shell scripting, that is), the contents of the global command log will probably be a good place to start.