- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: newbie stm question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 04:14 AM
тАО10-30-2000 04:14 AM
being relatively new to the world of HP-UX I'm still in the phase of discovering new (to me) tools and commands each day, and am hopping through the manpages, time permitting.
Up till now I've been desperately missing the beloved virtual /proc filesystem from Linux.
Mind you, all what I've learned about Unix so far I owe to Linux.
(wouldn't you agree that Linux/FreeBSD have done much to liberate Unix from mystical Guruism for the masses?)
Thus so far I would have placed such ugly lines as the following in my scripts to retrieve the RAM size, for instance:
mem=`top -s 1 -d 1|awk '/^Memory:/ {print $2}'|sed 's/[kmKM]//'`
or
mem=`dmesg|awk '$1=="Physical:" {print $2}'`
But I found both not particularly reliable.
(e.g. dmesg could be flushed, top's output seems to vary)
I know there have been many threads in this forum on the topic of how to find out about ones memory.
Even such awe inspiring hacks such as using a debugger on the kernel binaries.
But the meminfo only serves as an example and there are times when I occassionally need to collect other hardware info from the system.
Recently I discovered a diagmond daemon running on my servers and I came accross the stm manpage.
After having played a bit in the menus of mstm I would now like to use the command line version (viz. cstm or stm -c) to be invoked from my scripts.
How would I have to supply args to the command to achieve the same as highlighting the device (can the HW paths there always be expected to be same for same types of devices?), and then selecting tools->info->run from the menu?
Has anyone run stm from a script and can show me in an example (for easiness let's cling to the memory example) which syntax to use for that purpose.
Unfortunately the manpage (opposed to most of the other HP manpages) doesn't show an example.
Also the "help syntax" from the cstm> prompt wasn't much revealing.
Maybe some HP-UX veterans can shed some light?
TIA
Ralph
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 04:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 04:55 AM
тАО10-30-2000 04:55 AM
Re: newbie stm question
Try this (assuming ioscan yields memory at H/W path = 49)
# cstm << EOF
sel path 49
info; wait
infolog
> EOF
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 04:55 AM
тАО10-30-2000 04:55 AM
Re: newbie stm question
thanks, that's what I was looking for.
Actually I should have known (assumed) that stm like most Unix commands reads from stdin and thus can be piped into.
Is it advisable to place common commands in
/usr/sbin/stm/ui/config/.stmrc
or will even a ${HOME}/.stmrc file be parsed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 04:55 AM
тАО10-30-2000 04:55 AM
Re: newbie stm question
Try this (assuming ioscan yields memory at H/W path = 49)
# cstm << EOF
> sel path 49
> info; wait
> infolog
> EOF
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 05:00 AM
тАО10-30-2000 05:00 AM
Re: newbie stm question
the here file is syntactically only a different approach I would have gathered from the 1st reply.
Sorry, for only giving you 8 pts. but Patrick was first (first come, first serve ;-) and you are already a crownbearer anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2000 05:30 AM
тАО10-30-2000 05:30 AM
Re: newbie stm question
The file /usr/sbin/stm/ui/config/.stmrc is useful if you want to run the User Interface of the STM on your current system, but diagnose a remote system. I don't now any practical use for it if you run STM on the box you try to diagnose.