- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Regarding bdf output shell script
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
тАО02-04-2008 10:55 PM
тАО02-04-2008 10:55 PM
Regarding bdf output shell script
Currently I am running bdf and check process status at regular intervals of time, this is difficult. For this i need a shell programming in a such a way that when i run the script it should print output for bdf and process status.
I am very much new to HP UNIX so pls kindly help in this regard.
- Tags:
- bdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2008 12:08 AM
тАО02-05-2008 12:08 AM
Re: Regarding bdf output shell script
you can do it with a loop and a sleep time:
a simple example:
#!/usr/bin/ksh
while true ; do
bdf
sleep 5
done
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2008 12:17 AM - edited тАО09-17-2011 02:56 PM
тАО02-05-2008 12:17 AM - edited тАО09-17-2011 02:56 PM
Re: Regarding bdf output shell script
As in Oviwan's example, you can also have ps(1):
while true; do
bdf
UNIX95=EXTENDED_PS ps -ef -C name
sleep 5
done
If there is a particular filesystem you want to monitor with bdf, you can add that to the above bdf command.
- Tags:
- UNIX95
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2008 05:06 AM
тАО02-05-2008 05:06 AM
Re: Regarding bdf output shell script
In the 'ps' syntax give by Dennis, he showed the syntax for all processes (and lots of information about each ('-ef') along with the syntax to select ONE process by NAME.
If you want to list all processes, simply do:
# ps -ef
If you want to select a process by NAME, don't 'grep' the process list and risk false matches. Rather use the XPG4 (known as 'UNIX95') mode:
# UNIX95= ps -C syslogd
Notice carefully that there is simply whitespace after UNIX95= and no colon! This sets UNIX95 only for the duration of the command line so that it does not impact the behavior of other commands.
When running 'ps' with UNIX95 set, you have the ability to create custom output, like:
# UNIX95= ps -C syslogd -o args -o etime
...to show the 'syslogd' process arguments and elapsed time.
If you run the above, headings for each column of data are supplied. You can suppress these with "=" characters after the option names:
# UNIX95= ps -C syslogd -o args= -o etime=
Have a look at the 'ps' manpages for more options!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-05-2008 05:19 AM
тАО02-05-2008 05:19 AM
Re: Regarding bdf output shell script
The task you describe is a nice one as a reason to learn to use it well. Start with the basic scripts outlined above and improve on them
Now when you have done this for a while, please realize that the problem you are trying to solve is far from unique.
Many folks have solved similiar problems (too) many times.
There are commercial tools to do this properly as well as many 'hacks'.
Google +hpux +bdf +script +site:itrc.hp.com
And notably look for 'bdfmegs'.
You'll find stuff like:
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1035358
http://forums12.itrc.hp.com/service/forums/questionanswer.do?94954
And the collection in:
http://forums12.itrc.hp.com/service/forums/questionanswer.do?51050
Enjoy!
Hein van den Heuvel