1

I ran the following command on AIX in order to figure out the files opened by process 200866 on AIX 6.1.

procfiles -nc 200866

and got the following sample outputs:

  Current rlimit: 2000 file descriptors
---------------------------------------------------------------------------------------------------------------
 FD    TYPE MODE       DEV/RDEV     UID       GID        OPMOD                                          NAME
---------------------------------------------------------------------------------------------------------------
 10     -   rw-r--r--  10, 4        root      system     R|NH|DY 

Can anyone help me understand the meaning of the NH and DY in the OPMOD column? I googled a lot, but didn't find any relevant pages. Thanks!

1 Answer 1

2

They're simply an abbreviation of the file open mode flags that you see more completely without the -c flag.

I can't find documentation for the abbreviations, but the flag names are detailed in the open() docs. In your specific example, that would be a file open read-only (R), with O_NSHARE (NH) and O_DELAY (DY).

Here's a few with the C snippet that "produced" them.

open("./1", O_RDONLY|O_DELAY);
open("./2", O_RDONLY|O_NDELAY);
open("./3", O_WRONLY);
open("./4", O_RDWR|O_APPEND);
open("./5", O_RDONLY|O_NSHARE);
open("./6", O_RDONLY|O_RSHARE);
open("./7", O_RDWR|O_CIO);
22282268 : ./a.out
 Current rlimit: 32000 file descriptors
---------------------------------------------------------------------------
 FD    TYPE MODE       DEV/RDEV     UID       GID        OPMOD     NAME
---------------------------------------------------------------------------
 0      c   ---------  10, 4(20, 1) xxxxxxxx  xxxxxxxx   R-W|NC    //dev/pts/1
 1      c   ---------  10, 4(20, 1) xxxxxxxx  xxxxxxxx   R-W|NC    //dev/pts/1
 2      c   ---------  10, 4(20, 1) xxxxxxxx  xxxxxxxx   R-W|NC    //dev/pts/1
 3      -   r--r--r--  10, 8        xxxxxxxx  xxxxxxxx   R|DY      /home/xxxxxxxx/1
 4      -   r--r--r--  10, 8        xxxxxxxx  xxxxxxxx   R|NDY     /home/xxxxxxxx/2
 5      -   -w-------  10, 8        xxxxxxxx  xxxxxxxx   W         /home/xxxxxxxx/3
 6      -   rw-r--r--  10, 8        xxxxxxxx  xxxxxxxx   R-W|A     /home/xxxxxxxx/4
 7      -   r--r--r--  10, 8        xxxxxxxx  xxxxxxxx   R|NH      /home/xxxxxxxx/5
 8      -   r--r--r--  10, 8        xxxxxxxx  xxxxxxxx   R|RH      /home/xxxxxxxx/6
 9      -   rw-r--r--  10, 8        xxxxxxxx  xxxxxxxx   R-W|C     /home/xxxxxxxx/7
$ procfiles -n 22282268
22282268 : ./a.out
 Current rlimit: 32000 file descriptors
   0: S_IFCHR mode:00 dev:10,4 ino:28770 uid:29912237 gid:29912237 rdev:20,1
      O_RDWR | O_NOCTTY  name://dev/pts/1
   1: S_IFCHR mode:00 dev:10,4 ino:28770 uid:29912237 gid:29912237 rdev:20,1
      O_RDWR | O_NOCTTY  name://dev/pts/1
   2: S_IFCHR mode:00 dev:10,4 ino:28770 uid:29912237 gid:29912237 rdev:20,1
      O_RDWR | O_NOCTTY  name://dev/pts/1
   3: S_IFREG mode:0444 dev:10,8 ino:62 uid:29912237 gid:29912237 rdev:0,0
      O_RDONLY | O_DELAY size:0  name:/home/xxxxxxxx/1
   4: S_IFREG mode:0444 dev:10,8 ino:63 uid:29912237 gid:29912237 rdev:0,0
      O_RDONLY | O_NDELAY size:0  name:/home/xxxxxxxx/2
   5: S_IFREG mode:0200 dev:10,8 ino:67 uid:29912237 gid:29912237 rdev:0,0
      O_WRONLY size:0  name:/home/xxxxxxxx/3
   6: S_IFREG mode:0644 dev:10,8 ino:68 uid:29912237 gid:29912237 rdev:0,0
      O_RDWR | O_APPEND size:0  name:/home/xxxxxxxx/4
   7: S_IFREG mode:0444 dev:10,8 ino:69 uid:29912237 gid:29912237 rdev:0,0
      O_RDONLY | O_NSHARE size:0  name:/home/xxxxxxxx/5
   8: S_IFREG mode:0444 dev:10,8 ino:70 uid:29912237 gid:29912237 rdev:0,0
      O_RDONLY | O_RSHARE size:0  name:/home/xxxxxxxx/6
   9: S_IFREG mode:0644 dev:10,8 ino:71 uid:29912237 gid:29912237 rdev:0,0
      O_RDWR | O_CIO size:0  name:/home/xxxxxxxx/7

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .