on 08-22-2012 6:52 PM
Hi All,
I need to create Unix Script on my SAP HP-Unix box using kctune command to fetch following Unix Kernel Parameters and write output to file:
msgmnb |
msgtql |
msgmni |
shmmni |
vx_ninode |
vxfs_ifree_timelag |
maxdsiz_64bit |
maxssiz_64bit |
pa_maxssiz_64bit |
maxuprc |
nproc |
max_thread_proc |
Please suggest me how can I write it, Concept is Script should fetch value of these Parameters and put output in a file on the server.
Regards,
Shivam Mittal
Please provide output of kctune command as it is
then we can work on it because right now I don't have HP-UX access
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ahmad,
Thanks for reply, I am also in phase of getting Unix access for Servers.
As per URL - http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02259653/c02259653.pdf
We only need to put kctune as command to see all parameters. So now We only need to find how to put its output to file, Please tell me do you think below script will work -
#!/bin/csh
kctune > output.log
or what else need to be added.
Shivam
yeah this will work and put all the content in the file.
I would like to append information each time in same file.
#!/bin/csh
date >> /usr/sap/output123.log
/usr/sbin/kctune | grep msgmnb >> /usr/sap/output123.log
/usr/sbin/kctune | grep msgtql >> /usr/sap/output123.log
/usr/sbin/kctune | grep msgmni >> /usr/sap/output123.log
.....
like this for each parameter value
Hey Shivam,
You can append lines like
/usr/sbin/swapinfo >> /usr/sap/output123.log
or other commands you want to use for each of them, its fine too
If you want to use glance for all of the 3 info then you need to use grep, cut to get precise info.
if you want me to do it for you then you need to provide exact output of glance.
Consider assiging points if it helps.
Shivam,
If your glance output is like this screenshot
usr/perf/bin/glance | grep Glance >> /usr/sap/output123.log
echo "--------------------------------------------------------------------------------------------------" >> /usr/sap/output123.log
usr/perf/bin/glance | grep Util >> /usr/sap/output123.log
~~
By these 3 lines you can get CPU, Disk, Memory and Swap information
Please verify the full path of glance command.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.