[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dev pts mystery



Henrique de Moraes Holschuh wrote:
> On Tue, 04 Sep 2012, songbird wrote:
>> Henrique de Moraes Holschuh wrote:
>> > On Mon, 03 Sep 2012, songbird wrote:
>> >>   somehow (i can't say what happened or i'd
>> >> have the answer), now it looks like:
>> >> crw--w---- 1 me   tty  136, 0 Sep  3 20:05 0
>> >> crw--w---- 1 me   tty  136, 1 Sep  3 20:10 1
>> >> crw--w---- 1 root tty  136, 2 Sep  4  2012 2
>> >> crw--w---- 1 me   tty  136, 3 Sep  3 20:05 3
>> >> crw--w---- 1 me   tty  136, 4 Sep  3 20:05 4
>> >> c--------- 1 root root   5, 2 Sep  3 14:53 ptmx
>> >
>> > "ps auxwww | grep pts/2"  could tell you more about whatever has pts/2 open.
>> 
>> root@ant(1)~# ps auxwww | grep pts/2
>> root      7407  0.0  0.1   3460   768 pts/1    S+   16:08   0:00 grep pts/2
>> 
>>   no luck, this is after a reboot, no terminals 
>> open other than this one.
>
> Try "lsof | grep pts" or "fuser /dev/pts/2" (assuming pts/2 is the one with
> root permissions).  If neither command show any process with the relevant
> pts open, the weird permissions are left-over from a previous use.
>
> Maybe you have an open text console without any process attached to it?

  i'd would call it a open device file but not
an open console, as there is no other console/terminal
to interact with than this one.

  as it turns out, it was psad which was claiming that
device.  as soon as i purged the package it free'd it
back up.  lsof listed it (but ps did not), the trick
was that lsof as a regular user would not show it
either, had to be root.

  this is rather strange because psad was not updated
recently, but the kernel, udev and the init scripts
have all been upgraded so something has changed in
the mix to keep this device open when it used to be
free'd (or i'd have run into this problem a while 
ago because some of my debugging scripts i'm using
for a project use /dev/pts/1-10).


  songbird


Reply to: