Operating System - HP-UX
1833750 Members
2899 Online
110063 Solutions
New Discussion

lsof +aL1 and look under the column of NLINK, if the number is 0, that means

 
Jerry_109
Super Advisor

lsof +aL1 and look under the column of NLINK, if the number is 0, that means

HP-UX B.11.23 U ia64 hp superdome server SD32B
#######################################
What does it mean when lsof reports NLINK=0

Oracle DBA's are complaining of system slowness. also attached is ipcs -bomp

###########################################

# /usr/local/bin/lsof +aL1 /u00
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
oracle 1552 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1554 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1556 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1558 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1560 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1564 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1566 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1568 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1570 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1574 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1576 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 1578 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 2609 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 2937 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 2939 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 2943 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 2945 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 3206 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 3209 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 4442 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 4462 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 4853 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 4946 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 10639 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 10964 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 11074 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 11074 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 11074 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 11643 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 12149 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 12962 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 15148 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 15148 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 15148 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 15227 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 15523 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15525 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15527 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15529 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15531 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15533 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15535 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15537 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15539 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15541 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15543 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15798 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15800 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 15805 oracle 10u REG 64,0x10001 0 0 110363 /u00 (/dev/vg01/u00)
oracle 16415 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 16415 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 16415 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 18700 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18702 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18704 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18706 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18791 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18794 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18796 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18799 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18801 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18803 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18805 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18807 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 18985 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 19224 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 20725 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 20725 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 20725 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 21499 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 21501 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 22698 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 22711 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 22717 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 22719 oracle 8u REG 64,0x10001 0 0 106216 /u00 (/dev/vg01/u00)
oracle 26032 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 26032 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 26032 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 27399 oracle 12u REG 64,0x10001 0 0 111521 /u00 (/dev/vg01/u00)
oracle 28578 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28578 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28578 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28580 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28580 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28580 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28582 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28582 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28582 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28584 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28584 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28584 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28586 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28586 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28586 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28588 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28588 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28588 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28590 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28590 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28590 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28590 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28592 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28592 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28592 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28594 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28594 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28594 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28596 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28596 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28596 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28598 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28598 oracle 9u REG 64,0x10001 1934 0 107214 /u00 (/dev/vg01/u00)
oracle 28598 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28598 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28600 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28600 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28600 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28613 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 28613 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 28613 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)
oracle 28613 oracle 18u REG 64,0x10001 3211 0 107546 /u00 (/dev/vg01/u00)
oracle 29395 oracle 5u REG 64,0x10001 587 0 65619 /u00 (/dev/vg01/u00)
oracle 29395 oracle 11u REG 64,0x10001 0 0 42260 /u00 (/dev/vg01/u00)
oracle 29395 oracle 13u REG 64,0x10001 1208 0 89284 /u00 (/dev/vg01/u00)

#########################################
# ipcs -bomp
IPC status from /dev/kmem as of Wed May 9 08:31:04 2007
T ID KEY MODE OWNER GROUP NATTCH SEGSZ CPID LPID
Shared Memory:
m 0 0x41182c15 --rw-rw-rw- root root 0 348 949 29622
m 1 0x4e0c0002 --rw-rw-rw- root root 2 61760 949 29622
m 2 0x411c6f7e --rw-rw-rw- root root 2 8192 949 29622
m 3 0x06347849 --rw-rw-rw- root root 2 65544 1848 1946
m 819204 0x0c6629c9 --rw-r----- root root 2 58929152 1879 3929
m 5 0x49100031 --rw-r--r-- root root 0 22908 1854 1946
m 72122374 0x00000000 --rw-r----- oracle dba 28 356581376 18670 14206
m 720903 0x00000000 --rw-r----- oracle dba 28 369098752 18670 14206
m 655368 0x00000000 --rw-r----- oracle dba 28 690012160 18670 14206
m 655369 0x8b0bcae4 --rw-r----- oracle dba 28 8192 18670 14206
m 720906 0x00000000 --rw-rw---- oracle dba 22 373358592 28574 14468
m 163851 0x00000000 --rw-rw---- oracle dba 22 385875968 28574 14468
m 163852 0x00000000 --rw-rw---- oracle dba 22 438349824 28574 14468
m 163853 0x4a9936ac --rw-rw---- oracle dba 22 8192 28574 14468
m 27525134 0x00000000 --rw-rw---- oracle dba 42 339804160 1550 14149
m 655375 0x00000000 --rw-rw---- oracle dba 42 352321536 1550 14149
m 655376 0x00000000 --rw-rw---- oracle dba 42 1025556480 1550 14149
m 655377 0x146b7ae0 --rw-rw---- oracle dba 42 8192 1550 14149
m 200441874 0x00000000 --rw-rw---- oracle dba 15 759234560 15521 22577
m 393235 0x00000000 --rw-rw---- oracle dba 15 754974720 15521 22577
m 327700 0x00000000 --rw-rw---- oracle dba 15 622903296 15521 22577
m 327701 0xf8b13218 --rw-rw---- oracle dba 15 8192 15521 22577
m 611909654 0x05c0d794 --rw-r--r-- oracle dba 0 129 11860 6005



4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: lsof +aL1 and look under the column of NLINK, if the number is 0, that means

Hi Jerry:

A link count of zero means that the file will vanish and its space returned to the system as soon as the last process using it terminates.

It is very common to open a temporary file and immediate unlink() it [...the underlying system call for removing a file]. This avoids having to later remove it in epilog code or as part of a signal handler.

Regards!

...JRF...
Jerry_109
Super Advisor

Re: lsof +aL1 and look under the column of NLINK, if the number is 0, that means

So, this is OK ? How do you tell if a process is still it ? or if it's a Zombie just holding space?
A. Clay Stephenson
Acclaimed Contributor

Re: lsof +aL1 and look under the column of NLINK, if the number is 0, that means

These are simply temporary files and are the product of an extremely common UNIX idiom. You creat() or open() a file, unlink() it, but don't close() it. You now have an "invisible" file with a link count of zero. The space is not returned to the filesystem until the process either close()'es the file or the process terminate.

You would also see NOLINK = 0 for special files such as sockets.

You don't have to worry about zombies. They can't hold a file (or any other resource) because they are already dead. The only system (or ectoplasmic) resource that a zombie holds in a slot in the kernel's process table. Only when the number of zombies grows so large that the number begins to approach nproc is there are real harm from a zombie. This doesn't mean that they should be ignored because they indicate sloppy user and/or developer practices but zombies aren't your performance problem.

You should probably use more standard performance tools (e.g. Glance) to narrow the scope of your quest before jumping tp lsof.


If it ain't broke, I can fix that.
Jerry_109
Super Advisor

Re: lsof +aL1 and look under the column of NLINK, if the number is 0, that means

thank you both. I peek at glance....:-)