- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /etc/utmp not updated quick enough by inittab resp...
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
тАО08-31-2010 09:15 AM
тАО08-31-2010 09:15 AM
I have a "C" process that runs out of inittab (MRupddo). The first thing the process does is look for its entry in /etc/utmp using function getutent()
Unfortunately for some reason, it occasionally only finds the previous "dead" process, and not the one just started up????
It appears that the process is checking /etc/utmp before it has been updated by inittab, so the proccess does not find its own pid...
This is HPUX 11.11
Checking our pid=7404 pid=7350 user=MRupddo id=AMuo line= type=8
the process terminates since it doesnt find its pid in /etc/utmp
then inittab respawns it
Checking our pid=7405 pid=7404 user=MRupddo id=AMuo line= type=8
then inittab respawns it again....
Checking our pid=7406 pid=7405 user=MRupddo id=AMuo line= type=8
until it respawns too fast and is shut down..
I'm hoping this a known problem, and may have a patch to fix it, but I think my patch level is current....
Thanks for any ideas
Gary
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2010 09:29 AM
тАО08-31-2010 09:29 AM
Re: /etc/utmp not updated quick enough by inittab respawns
My first thought is that the file is buffered and thus you're not seeing "instantaneous" recording.
Does your program call 'setutent()' before looking for the latest entry? It should.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2010 09:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2010 09:59 AM
тАО08-31-2010 09:59 AM
Re: /etc/utmp not updated quick enough by inittab respawns
I do not call setutent() because when the process respawns it always starts at the beginning of the file.
I am in fact trying to match on utp->ut_pid with my respawned process pid. Unfortunately /etc/utmp has the wrong ut_pid "dead" for the currently respawned process?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2010 10:20 AM
тАО08-31-2010 10:20 AM
Re: /etc/utmp not updated quick enough by inittab respawns
additional parameters into the environment.
I did try a sleep(5) and it did solve the problem. The issue that creates is, I don't believe the process will ever be shut down for respawning too fast. I really dont want inittab firing this thing up every 5 seconds if there really is a problem....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2010 10:23 AM
тАО08-31-2010 10:23 AM
Re: /etc/utmp not updated quick enough by inittab respawns
> I did try a sleep(5) and it did solve the problem.
Ah, "...Sleep that knits up the ravell'd sleeve of care..."
Regards :-)
...JRF...