Re: Script for collection system information (308 Views)
Reply
Frequent Advisor
Posts: 54
Registered: ‎11-18-2005
Message 1 of 8 (308 Views)
Accepted Solution

Script for collection system information

Hi,

I need script for getting system informaiotn like

1.Uptime
2.Last fail date and time:

and also i am implementing cacti for monitor i want to monitor all the unix server without using SNMP so please if you have any idea or script get datas thr' ssh please share to me
Honored Contributor
Posts: 2,909
Registered: ‎02-13-2000
Message 2 of 8 (308 Views)

Re: Script for collection system information

Hi

Interesting idea but why not.

http://www.shelldorado.com/

Is the place to look for scripts

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Honored Contributor
Posts: 4,194
Registered: ‎04-07-2005
Message 3 of 8 (308 Views)

Re: Script for collection system information

Hello,

You can use commands like,

# /opt/ignite/bin/print_manifest
and tools like http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sysinfo-3.3.1/

Also, Do a search with ITRC, you will get lot of threads, like this one.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=22937

-Arun


"A ship in the harbor is safe, but that is not what ships are built for"
Honored Contributor
Posts: 763
Registered: ‎03-05-2002
Message 4 of 8 (308 Views)

Re: Script for collection system information

As to last fail date and time it could be tricky since there are different kinds of failures in HPUX. Like,for example,one may see "panic" string in /etc/shutdownlog on certain event but may not see it as well since its not allways get there :)

To be simplistic - forget about last fail date and time, go for uptime. Anyway,clean reboots,halts and hang/panic events would be often seen in /etc/shutdownlog.

Now,what do you mean by "monitor the unix server"? What kind of monitoring?

Hardware events can be monitored by some methods,like Online Diagnostics for example (EMS) which capable to send e-mails on critical events.Or Webes tool.

Software events...well sky is the limit here.

So prepare a list of what you'd like to monitor first.
So computers don't think yet. At least not chess computers. - Seymour Cray
Acclaimed Contributor
Posts: 21,184
Registered: ‎07-06-2000
Message 5 of 8 (308 Views)

Re: Script for collection system information

Hi Venkat:

Why not query?

1. uptime
2. who -b
3. /etc/shutdownlog

The three give you the basic information of ups-and-downs.

Regards!

...JRF...
Frequent Advisor
Posts: 54
Registered: ‎11-18-2005
Message 6 of 8 (308 Views)

Re: Script for collection system information

i want to get uptime and last reboot value from local server to remote server and remote server i have solaris ,aix and hpux

please help me
Honored Contributor
Posts: 4,194
Registered: ‎04-07-2005
Message 7 of 8 (308 Views)

Re: Script for collection system information

Hi,

You can use "remsh" to get these values. Just you use the commands given JRF.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Frequent Advisor
Posts: 54
Registered: ‎11-18-2005
Message 8 of 8 (308 Views)

Re: Script for collection system information

i am getting value thro ssh i setted ssh keys all unix servers.

But i want to do run the php file i,e

$system = x.x.x.x;
$data = shell_exec("ssh root@$system uptime");
print "Uptime: $data
\n";
?>

But its error is showing please help me how to define ssh on PHP file
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.