Forum Stats

  • 3,815,470 Users
  • 2,259,032 Discussions
  • 7,893,112 Comments

Discussions

process open file

User_X6IRI
User_X6IRI Member Posts: 35 Green Ribbon

Hi,

I like to see the open files by sshd and i dont understand what files are open,what is

0: S_IFCHR mode:0666 dev:16381,0 ino:61865992 uid:0 gid:3 rdev:118,2

   O_RDWR|O_LARGEFILE

   /devices/pseudo/[email protected]:null

   offset:0


ps -ef|grep ssh

  root  460   1  0 13:13:03 ?      0:00 /usr/lib/ssh/sshd

  root 1203 1195  0 13:17:14 pts/1    0:00 grep ssh

  root 1191  460  1 13:16:09 ?      0:00 /usr/lib/ssh/sshd -R

[email protected]:~# pfiles 460

460:  /usr/lib/ssh/sshd

 Current rlimit: 256 file descriptors

  0: S_IFCHR mode:0666 dev:16381,0 ino:61865992 uid:0 gid:3 rdev:118,2

   O_RDWR|O_LARGEFILE

   /devices/pseudo/[email protected]:null

   offset:0

  1: S_IFCHR mode:0666 dev:16381,0 ino:61865992 uid:0 gid:3 rdev:118,2

   O_RDWR|O_LARGEFILE

   /devices/pseudo/[email protected]:null

   offset:0

  2: S_IFCHR mode:0666 dev:16381,0 ino:61865992 uid:0 gid:3 rdev:118,2

   O_RDWR|O_LARGEFILE

   /devices/pseudo/[email protected]:null

   offset:0

  3: S_IFSOCK mode:0666 dev:16377,0 ino:27192 uid:0 gid:0 size:0

   O_RDWR|O_NONBLOCK FD_CLOEXEC

    sockname: AF_INET6 :: port: 22

    SOCK_STREAM

    SO_REUSEADDR,SO_ACCEPTCONN,SO_SNDBUF(49152),SO_RCVBUF(256000)

    listen backlog: 128

    congestion control: newreno

  4: S_IFSOCK mode:0666 dev:16377,0 ino:5070 uid:0 gid:0 size:0

   O_RDWR|O_NONBLOCK FD_CLOEXEC

    sockname: AF_INET 0.0.0.0 port: 22

    SOCK_STREAM

    SO_REUSEADDR,SO_ACCEPTCONN,SO_SNDBUF(49152),SO_RCVBUF(256000)

    listen backlog: 128

    congestion control: newreno

then

ls -al /proc/460/fd

total 4

dr-x------  2 root   root     272 Jan 10 13:13 .

dr-xr-xr-x  7 root   root    1088 Jan 10 13:13 ..

c---------  1 root   sys   118, 2 Jan 10 13:17 0

c---------  1 root   sys   118, 2 Jan 10 13:17 1

c---------  1 root   sys   118, 2 Jan 10 13:17 2

s---------  0 root   root      0 Jan 1 1970 3

s---------  0 root   root      0 Jan 1 1970 4

I like to see those files with their name.


Thank you

Answers