The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
.
google unix.com



HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Get real value from real-time systems iBot Complex Event Processing RSS News 0 01-14-2008 02:10 AM
capturing real time wisher115 UNIX for Dummies Questions & Answers 2 09-22-2006 09:26 PM
EPOCH to real time? TheEngineer UNIX for Advanced & Expert Users 5 07-18-2006 08:30 AM
log users real time chanfle UNIX for Dummies Questions & Answers 3 03-22-2006 05:31 PM
multiplex programming in real-time OS. bsderss UNIX for Advanced & Expert Users 0 08-10-2005 04:24 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-06-2003
JOHNSON JOHNSON is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 7
Question Scripts for monitoring real time for the error code

Hi ! I wish extract one information(error code) from the machine which is running on the HP-UX platform. Can anyone help me?

Wanted to write a scripts that monitor real time at the error code and transfer the information out from the machine. The information is then process and SMS out to the user.
  #2 (permalink)  
Old 10-06-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
What error message? The best you can reasonably do is to check for the error, say, once every 5 minutes or so. You can check as often as you like within reason, but you don't want to overload the machine.

By sms, I assume that you want to send a very text message to a particular email address?
  #3 (permalink)  
Old 10-06-2003
JOHNSON JOHNSON is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 7
Post

Hi Perderabo,
Many thanks for your quick reply. When there the machine encounter an error, it will need some human assistance. Therefore i need to monitor the error it generated in real time and continuously because i want to notify the users so that the users can address the error promptly and the down time of the machine can be minimized.

How can i overload the machine by monitoring the machine error code?

The user will be notified by SMS using their email address/mobile phone.
  #4 (permalink)  
Old 10-06-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
You still have specified what errors you are looking to monitor. I'll guess that you want to monitor /var/adm/messages for anything.

From your thread in the Linux forum, I gather that you are writing in C++. You can use fstat() or stat() to see if the file has been changed. But you must repeatedly invoke fstat(). Let's say that you want your program to notice a new error message in less than a millisecond. Then 1000 times each second you must fstat() that file. That is quite a load for the box. Even HP's fastest cpu will spend a high percentage of it's time doing that. Most realtime applications can tolerate a millisecond delay so I'm guessing that this would be enough. Now suppose that you can tolerate a one second delay between the arrivial of the error message and your program noticing it. That would reduce the load on the box by a factor of 1000. At this point the cpu can do some other things. Most of us will actually tolerate 2 or 3 minutes in a situation like this. Some of us would even go as high as 5 minutes. But it's your box, you can loop as fast as you want.
  #5 (permalink)  
Old 10-07-2003
JOHNSON JOHNSON is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 7
How can i prevent the machine from overloading if i wish to monitor the status at real time?

Currently we are donwloading the errorlog every 30 min from the machine. The errorlog is being copy out from the machine through netwoking.
  #6 (permalink)  
Old 10-07-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
I would write a script to examine errlog and if finds something, it will email someone. It would do this once, it would not loop. Then I would use cron to schedule it to run every five minutes.
  #7 (permalink)  
Old 10-07-2003
JOHNSON JOHNSON is offline
Registered User
  
 

Join Date: Oct 2003
Posts: 7
The main idea is to notify the user when the machine encounter an error so that the user can address the problem promptly.

If i do not loop, user will not know that there is a problem with the machine immediatley.

Can you shed some light for me as to guide me to better solution regarding my concern?

If i am unable to add or change any scripts at the machine side, can i used another PC(external source) to interrogate the machine status by monitong the path where the error is kept and copy the error code and send the message to the user through SMS?
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0