- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script Control
Operating System - HP-UX
1753259
Members
6255
Online
108792
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО05-29-2002 12:17 AM
тАО05-29-2002 12:17 AM
Script Control
Hi all
I wrote a script, and I'd like someone to suggest me if it's right, if there are problems.
in attachement there is also the requirements.
Regards, Angelo
Overview of the ERS use of files:
When the variable XSM_ER_WRITE_EVENTS_TO_FILE is set to 1, the event router will maintain its processing information within the directory $XSM_TMP/ER. This processing information can be used to find a stale GUI registration. If XSM_ER_WRITE_TO_FILE is set to 0, there will not be enough information in the $XSM_TMP/ER directory to identify a stale registration. The following files that can be found within directory $XSM_TMP/ER are used by the event router:
events/e## -- These directories hold the event files.
registrations/pcNameOrIP.PID -- These files contain the DCE object name and the GUI registration infomation. The first line is the DCE object name and the second line to the last list are the registration strings.
events_sent/pcNameOrIP.PID -- These files contain the last event number that was successfully sent to the GUI.
Identifying a stale GUI registration
Note: The check for stale registrations needs to ignore the UNIX server processes.
The post time for the oldest event is timestamp on the oldest file in the events directory. If this file is over 20 minutes old, there is a back log of events. The UNIX command for printing this timestamp is:
ls -ltr $XSM_TMP/ER/events/e*/* | awk 'NR == 1 {print $8}'
The GUIs causing the backlog are all the GUIs with files in the events_sent directory:
that have a length of 0 (i.e. no events were sent to that PC) or
where the contents of the file refer to an event file that does not exist. i.e. if the file
$XSM_TMP/ER/events/e*/$(cat $XSM_TMP/ER/events_sent/pcNameOrIP.PID)
exists then the GUI registration is active. Otherwise the GUI registration is stale.
The surest way to remove the stale GUI registration is to:
Identify the events_sent and registration files for the stale GUI registrations
Stop the event router
Remove the identified events_sent and registration files
Start the event router
I wrote a script, and I'd like someone to suggest me if it's right, if there are problems.
in attachement there is also the requirements.
Regards, Angelo
Overview of the ERS use of files:
When the variable XSM_ER_WRITE_EVENTS_TO_FILE is set to 1, the event router will maintain its processing information within the directory $XSM_TMP/ER. This processing information can be used to find a stale GUI registration. If XSM_ER_WRITE_TO_FILE is set to 0, there will not be enough information in the $XSM_TMP/ER directory to identify a stale registration. The following files that can be found within directory $XSM_TMP/ER are used by the event router:
events/e## -- These directories hold the event files.
registrations/pcNameOrIP.PID -- These files contain the DCE object name and the GUI registration infomation. The first line is the DCE object name and the second line to the last list are the registration strings.
events_sent/pcNameOrIP.PID -- These files contain the last event number that was successfully sent to the GUI.
Identifying a stale GUI registration
Note: The check for stale registrations needs to ignore the UNIX server processes.
The post time for the oldest event is timestamp on the oldest file in the events directory. If this file is over 20 minutes old, there is a back log of events. The UNIX command for printing this timestamp is:
ls -ltr $XSM_TMP/ER/events/e*/* | awk 'NR == 1 {print $8}'
The GUIs causing the backlog are all the GUIs with files in the events_sent directory:
that have a length of 0 (i.e. no events were sent to that PC) or
where the contents of the file refer to an event file that does not exist. i.e. if the file
$XSM_TMP/ER/events/e*/$(cat $XSM_TMP/ER/events_sent/pcNameOrIP.PID)
exists then the GUI registration is active. Otherwise the GUI registration is stale.
The surest way to remove the stale GUI registration is to:
Identify the events_sent and registration files for the stale GUI registrations
Stop the event router
Remove the identified events_sent and registration files
Start the event router
I will work harder, HP-UX is always right
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 12:22 AM
тАО05-29-2002 12:22 AM
Re: Script Control
Hi,
not very nice to burden our community with your day to day job. I hope you are paid for it.
The script is lacking everything which makes it understandable without unnecessary deep involvement. Please write comments before every paragraph of your script.
Klaus
not very nice to burden our community with your day to day job. I hope you are paid for it.
The script is lacking everything which makes it understandable without unnecessary deep involvement. Please write comments before every paragraph of your script.
Klaus
There is a live before death!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 04:34 AM
тАО05-29-2002 04:34 AM
Re: Script Control
Trenta,
As Klaus said, you need to add a lot of comments to your script.
And you need to add a lot of ERROR checking. You are performing "rm"'s and "cd"'s without any error checking, which is very very dangerous.
I'd also suggest putting "echo" in front of the commands like "rm", just to make sure they are going to perform the way you want it to. Also, use "set -x" to "trace" the script!
live free or die
harry
As Klaus said, you need to add a lot of comments to your script.
And you need to add a lot of ERROR checking. You are performing "rm"'s and "cd"'s without any error checking, which is very very dangerous.
I'd also suggest putting "echo" in front of the commands like "rm", just to make sure they are going to perform the way you want it to. Also, use "set -x" to "trace" the script!
live free or die
harry
Live Free or Die
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 06:06 AM
тАО05-29-2002 06:06 AM
Re: Script Control
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP