cancel
Showing results for 
Search instead for 
Did you mean: 

getting info out of sysinfo

 
khilari
Regular Advisor

getting info out of sysinfo

hi guys, well i have to make a script in which i extract fields like
Model
Serial Number
OS version
Installed CPU
Active CPU
CPU speed
Total Memory
Actived Memory
IP Address


from the server. any idea how to do it.
Thanks
6 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: getting info out of sysinfo

Hi:

There are numerous posts in this Forum that will point you to a solution. A useful compendium of the information you seek can be found in Ignite's print_manifest:

'/var/opt/ignite/recovery/latest/manifest'

Regards!

...JRF...
khilari
Regular Advisor

Re: getting info out of sysinfo

ya, but how do i extract the above info from that in a script form... okay what about the commands to get
serial number
installed cpu
active cpu
cpu speed
total memory
active memory

thanks
Steven E. Protter
Exalted Contributor

Re: getting info out of sysinfo

Shalom,

make a list called file.

serial number
installed cpu
active cpu
cpu speed
total memory
active memory

while read -r data
do
grep $data filename >> output_file
done < file


Output file has the relavent data in it.

In essence, you have to write a script. You can either hunt around for one and modify it or write it yourself.

Check my profile sysadmin scripts, lots of good stuff in there.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yashwant
Valued Contributor

Re: getting info out of sysinfo

for serial number
command is getconf_MACHINE_SERIAL


for other fields..

command is cstm
Pete Randall
Outstanding Contributor

Re: getting info out of sysinfo

In a very simple form, you could run print_manifest and redirect it's output to a file, then grep out the appropriate information:

cat myinfo.sh

print_manifest > manifesto
grep Serial manifesto
grep OS manifesto
etc.
etc.

It would take you a couple of minutes to examine the print_manifest output and construct your grep statements, but I'm sure you're capable of that.


Pete

Pete
Taq
Occasional Visitor

Re: getting info out of sysinfo

Hello Khilari,

You should use sysinfo and grep the info that you need. Also, you can use serialnum to get serial number from 11iv3.

Also, try to install a utility called sysinfo

Cheers,
Taq