No such PID ?!?!?!?!?! Expert Help Needed!

No such PID ?!?!?!?!?! Expert Help Needed!

Post by Anthony Cha » Sun, 31 Dec 1899 09:00:00



When i try to Halt or Reboot my Linux box, it tells me that there is No
Such PID for almost EVERYTHING running!  Why is it doing this?  This just
happened all of a sudden, but all the processes seem to be running fine..
Its just alittle disconcerting that it gives me so many error messages
when i shutdown.

HELP PLEASE!
Anthony

--
Posted via CNET Help.com
http://www.help.com/

 
 
 

No such PID ?!?!?!?!?! Expert Help Needed!

Post by Lew Pitch » Sun, 31 Dec 1899 09:00:00


On Tue, 19 Sep 2000 17:30:05 -0000, Anthony Chan


>When i try to Halt or Reboot my Linux box, it tells me that there is No
>Such PID for almost EVERYTHING running!  Why is it doing this?  This just
>happened all of a sudden, but all the processes seem to be running fine..
>Its just alittle disconcerting that it gives me so many error messages
>when i shutdown.

It could be that you have a corrupt utmp file

Lew Pitcher
Information Technology Consultant
Toronto Dominion Bank Financial Group


(Opinions expressed are my own, not my employer's.)

 
 
 

No such PID ?!?!?!?!?! Expert Help Needed!

Post by Anthony Cha » Sun, 31 Dec 1899 09:00:00


Well, what should the  utmp file look like, the one in my /var/run/utmp says
a bunch of garbage which i can't even make out.  some words like
reboot, tty, LOGIN, and thats about all i can read. the rest at strange
boxes, or signs, and letters, i even see a Yen sign. is this normal?
And how should i fix this?


> On Tue, 19 Sep 2000 17:30:05 -0000, Anthony Chan

> >When i try to Halt or Reboot my Linux box, it tells me that there is No
> >Such PID for almost EVERYTHING running!  Why is it doing this?  This just
> >happened all of a sudden, but all the processes seem to be running fine..
> >Its just alittle disconcerting that it gives me so many error messages
> >when i shutdown.

> It could be that you have a corrupt utmp file

> Lew Pitcher
> Information Technology Consultant
> Toronto Dominion Bank Financial Group


> (Opinions expressed are my own, not my employer's.)

 
 
 

No such PID ?!?!?!?!?! Expert Help Needed!

Post by Andreas K?h?r » Sun, 31 Dec 1899 09:00:00




>Well, what should the  utmp file look like, the one in my /var/run/utmp says
>a bunch of garbage which i can't even make out.  some words like
>reboot, tty, LOGIN, and thats about all i can read. the rest at strange
>boxes, or signs, and letters, i even see a Yen sign. is this normal?
>And how should i fix this?

The utmp file is a binary file. You *should* be seeing stars, yen
signs and at signs and stuff on your screen (and the speaker probably
beeps a bit too) if you view it with e.g. 'cat'.

If it (your problem) is indeed due to a corrupted utmp file, then one
may ask oneself why it is corrupted. Some bad crackers tries to change
the utmp file so that their cracker run isn't documented in it. If
they*up, then they corrupt the file. BUT:

       Note that the utmp struct from libc5 has changed in libc6.
       Because of this, binaries using the old libc5 struct  will
       corrupt   /var/run/utmp   and/or   /var/log/wtmp.   Debian
       systems include a patched libc5 which uses  the  new  utmp
       format.   The  problem  still  exists with wtmp since it's
       accessed directly in libc5.

You may remove the utmp file and create a new empty file by 'touch'ing
it. My utmp file (on Debian 2.2 mind you) has the following
permissions set:

[hurd] ~ $ ls -l /var/run/utmp
-rw-rw-r--    1 root     utmp         8.6k sep 19 19:11 /var/run/utmp

Another way would be to "cat /dev/null > /var/run/utmp".

Before trusting me on this, search the LDP at
<URL:http://www.veryComputer.com/; for info about the utmp file and what
you may and may not do with it.

/A

--
Andreas K?h?ri, <URL:http://www.veryComputer.com/;. Junk mail, no.
------------------------------------------------------------------------
Put a part of GNU in every box: <URL:http://www.veryComputer.com/;

 
 
 

No such PID ?!?!?!?!?! Expert Help Needed!

Post by Juergen Hein » Sun, 31 Dec 1899 09:00:00



>Well, what should the  utmp file look like, the one in my /var/run/utmp says
>a bunch of garbage which i can't even make out.  some words like
>reboot, tty, LOGIN, and thats about all i can read. the rest at strange
>boxes, or signs, and letters, i even see a Yen sign. is this normal?
>And how should i fix this?



>> On Tue, 19 Sep 2000 17:30:05 -0000, Anthony Chan

>> >When i try to Halt or Reboot my Linux box, it tells me that there is No
>> >Such PID for almost EVERYTHING running!  Why is it doing this?  This just
>> >happened all of a sudden, but all the processes seem to be running fine..
>> >Its just alittle disconcerting that it gives me so many error messages
>> >when i shutdown.

>> It could be that you have a corrupt utmp file

[-]

/var/run/utmp is not a text file. You can do a utmpdump < /var/run/utmp
if you've installed this binary, but even if not I cannot see why utmp
should be the problem. Minor note, it is quite okay to reset utmp to 0
length during boot, but never ... *NEVER* delete it as then you won't
be able to log in easily.

One question, you don't run umount -a before killing all processes in
the halt script ( find /etc -name "*halt*" ) ? If so, then killall,
usually the command used to, well, kill all processes is not going
to find the process id's anymore. Would be a real bummer 8-]

Oh yes, one note - please quote after the original text, not before
as it is easier to follow.

Cheers,
Juergen

--
\ Real name     : Jrgen Heinzl         \       no flames      /