Server Management - Systems Insight Manager
1819502 Members
2970 Online
109603 Solutions
New Discussion юеВ

Run UPTIME.EXE against selected server

 
John Kramer
Advisor

Run UPTIME.EXE against selected server

I would like to run the Windows uptime.exe utility against a selected server as a custom tool. Anybody have a good example how to accomplish this? The documentation I have found isn't very specific.

The hope would be that my operations staff could use this tool to check the system uptime after a network outage to detect if the system was actually down or just a network glich.

Could also use this same command with different parameters to run a scheduled task for system uptime reporting.
3 REPLIES 3
John Kramer
Advisor

Re: Run UPTIME.EXE against selected server

Anybody have any idea's about this?
Scott Shaffer
Esteemed Contributor

Re: Run UPTIME.EXE against selected server

Using 'Custom Commands' you could create an entry to run 'uptime %devicename%' and it would do what you want.

You could also create a custom menu item to run uptime.exe (assuming you have SSH installed on all the managed servers) by extracting one of the existing tool definitions (I'd recommend netstat) via the CLI (mxtool in this case), editing it to run uptime instead, and then importing it back into HP SIM.

I believe the steps to be (forgive me I am trying to remember all the CLI switches from memory) as below.

Extract the entry:
mxtool -l -f -t netstat > netstat.xml

Copy it:
copy netstat.xml uptime.xml

Edit uptime.xml to run 'uptime' instead of netstat - note that you can also include other parameters if you want, such as /s. You'll also want to name the tool 'uptime' instead of 'netstat' and change the menu name to 'Uptime...'

Import it:
mxtool -a -f uptime.xml
Dude, we've been totally misled by our album covers!
John Kramer
Advisor

Re: Run UPTIME.EXE against selected server

Go info thanks.