- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Tools To help Manage HP-UX Environment
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
Forums
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
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
тАО03-01-2001 11:13 AM
тАО03-01-2001 11:13 AM
I need help. I have about 12 hp-ux servers (10.20 and 11). I am finding it more and more time consuming checking things every morning such as disk space (sometimes it fills up fast), daemons running (such as bind), applications working (such as oracle) and etc. I am being asked by "management" to make sure that everything stays operational and to be alerted when things go arwy. What I am looking for is some ideas or a product that I can use (freeware, shareware or commercial) tha is easy to set up that can contact me via pager or an email when certain things go out of wack. I do have openview but it looks like it takes a lot of time to get into and to set up. Any ideas? Thoughts?
Thanks,
Mike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2001 11:26 AM
тАО03-01-2001 11:26 AM
Re: Tools To help Manage HP-UX Environment
Just about anything can be scripted if you have the time to play with it.
You are right about NNM. It is a pain to set up and get configured just the way you want it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2001 11:29 AM
тАО03-01-2001 11:29 AM
Re: Tools To help Manage HP-UX Environment
Could I get a cy of your script that does the disk checking and then paging? i am not a perl or shell script miester but i sure could use a starting point. Plus I could tweak the script to suit my needs easier than writing it all together. The other script(s) you mentioned would be usefull too. If you want you can email them to me: grettm@osd.pentagon.mil.
Thanks,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2001 11:33 AM
тАО03-01-2001 11:33 AM
Re: Tools To help Manage HP-UX Environment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2001 04:47 PM
тАО03-01-2001 04:47 PM
Re: Tools To help Manage HP-UX Environment
Patricia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2001 01:27 AM
тАО03-02-2001 01:27 AM
Re: Tools To help Manage HP-UX Environment
script code | mailx -s 'SUBJECT check your system' user@mail.domain.com
#####################################################################
# Script name: oraclenotify
# Script purpose: place a notification message on system console
# Written by: Brian Markus -
# bmarkus@rcoe.k12.ca.us
# Date: 4/16/1999
#####################################################################
percent=`bdf | grep -i oracle\$ | awk ' { print $5 } ' | sed 's/\%//'`
if [ ${percent} -gt 95 ]
then
banner "/oracle is" "at ${percent}%" "Notify DBA" > /dev/console
else
echo "/oracle is at ${percent}%" > /dev/console
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2001 01:34 AM
тАО03-02-2001 01:34 AM
Re: Tools To help Manage HP-UX Environment
You may also like to use the logger command to send alerts to a central station's syslog daemon so that you have all the alerts at a centralised location.
To email or send an alert, simply interface your log file on the centralised server with your email script or your comms software such as kermit to perform the necessary email or paging alert respectively.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2001 04:14 AM
тАО03-02-2001 04:14 AM
Re: Tools To help Manage HP-UX Environment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2001 06:51 AM
тАО03-02-2001 06:51 AM
Re: Tools To help Manage HP-UX Environment
Here is some documentation for the script:
The
2nd line from the bottom (/usr/telalert....) is what pages me. We have
a paging system called telalert that can send out text pages to our
alphanumeric pagers. If you wanted to send an e-mail to your pager or
to where ever, then you can just change that command line to call
whatever program you want.
The awk portion of the program will look at all lines of a 'bdf -l' (I
use the -l so that it will only see local LVs and not NFS mount points)
except the first line head and the cdrom if it is mounted. I had to do
the if statement in the because I have some LVs that have rather long
names and the bdf output for the one LV is on two lines like the
following.
And here is the sript:
#!/bin/ksh
H=`hostname`
fs=`bdf -l | awk '
/%/ && ($6 !~ /cdrom/ ) && ($1 !~ /Filesystem/ ){
if ( $1 > 0 )
{ split($4,perc,"%"); if (perc[1]>=99) {print h": " $5 " at " $4} }
else
{ split($5,perc,"%"); if (perc[1]>=99) {print h": " $6 " at "$5} }
}
' h=$H`
if [[ ! -z $fs ]]
then
# echo $fs
/usr/telalert/telalertc -host hp_ebs -i WallekTextPager -m $fs
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2001 06:55 AM
тАО03-02-2001 06:55 AM
Re: Tools To help Manage HP-UX Environment
to run the script and pipe the output to mailx to e-mail the info to me.
The first thing this scipt does is check all my volume groups to make
sure all mirrors are synced. I use MirrorDisk/UX quite extensively and
if I lose a disk it can be difficult to catch sometimes. I do the
vgdisplay and grep for stale so that if it comes back with anything,
then I know I've got problems. I think everything else is pretty
straightforward.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2001 08:02 AM
тАО03-02-2001 08:02 AM
Re: Tools To help Manage HP-UX Environment
Disk space issues are a concern. This suggests that your DBA's are not communicating their needs with you. If you find that you are cleaning the same areas continually, you probably need to automate the purging of these areas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2001 11:54 AM
тАО03-02-2001 11:54 AM
Re: Tools To help Manage HP-UX Environment
I am a new player to UNIX (two weeks of HP classes and some on-the-job-training). I too have been looking for something like this. I was playing with using "cut" and a bunch of other game playing. Your solution looks much easier. When I tried your script I keep getting "bdf4.sh[4]: Syntax error at line 5 : `{' is not expected. ". I have checked and double-checked my keying of your script. Where did I go wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2001 01:36 PM
тАО03-02-2001 01:36 PM
SolutionI can't tell you exactly where you went wrong without seeing the script, but I suspect that there is something in the if statement. There are some requirements for spaces in some of the statements. Did you try just cutting and pasting out of the browser? Post what you have done and I'll take a look at it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2001 06:47 AM
тАО03-05-2001 06:47 AM
Re: Tools To help Manage HP-UX Environment
Here is the script (in an attachment). Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2001 06:51 AM
тАО03-05-2001 06:51 AM
Re: Tools To help Manage HP-UX Environment
It looks like the attachment didn't take. I guess I had to "cut & paste".
# bdf4.sh
H=`hostname`
fs='bdf -l | awk '
/%/ && ($6 !~ /cdrom/ ) && ($1 !~ /Filesystem/ ){
if ( $1 > 0 )
{ split($4,perc,"%"); if (perc[1]>=90) {print h": " $5 " at " $4} }
else
{ split($4,perc,"%"); if (perc[1]>=90) {print h": " $6 " at "$5} }
}
'h=$h'
if [[ ! -z $fs ]]
then
echo $fs
fi
exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2001 07:18 AM
тАО03-05-2001 07:18 AM
Re: Tools To help Manage HP-UX Environment
OK.... I see several things that will make a difference.
1) Put #!/bin/ksh as the first line of your script so that you are sure you are using the ksh.
2) The second split statement should be split($5 instead of $4
3) Towards the end of the script you have 'h=$h' It should be:
' h=$H ` With the back tick ` at the end of the line the finish off the bdf command statement in the fs variable.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2001 07:47 AM
тАО03-05-2001 07:47 AM
Re: Tools To help Manage HP-UX Environment
Thanks, that did the trick. Actually, I just did a "cut & paste" from your original.
ps-I thought a "#" in the first position flagged the line as a comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2001 07:51 AM
тАО03-05-2001 07:51 AM