On Solaris, when I type the command

lsof -l

I encountered this error:

lsof: can't read namelist from /dev/ksyms

Anyone knows what this error means and how I can get open the list of open FD's using lsof in Solaris?


2 Answers 2


The closest equivalent using Solaris standard commands would be

pfiles /proc/*
  • hi jlliagre thanks for answering. I found out that for Solaris 5 i need to use /usr/bin/pfiles /proc/PID/fd to get some info. However there is a warning stating that pfiles stop processes when its inspecting them until they can generate a report. So i just have to be extra careful with this.
    – dimas
    Commented Mar 1, 2013 at 1:27
  • 1
    There is no Solaris 5, I guess you mean Solaris 10 (SunOS 5.10). Unless you have critical real-time processes running or processes with an extremely large number of open files, suspending processes to inspect their open files should have no significant impact. Actually, processes are interrupted all the times by the kernel anyway. Should you really want not to stop running processes, there is a more complex solution based on "mdb -k" here mail.opensolaris.org/pipermail/dtrace-discuss/2008-December/…
    – jlliagre
    Commented Mar 1, 2013 at 2:15
  • My mistake its SunOS 5.10 . Thanks for the information though coz I was really afraid it would have significant impact if I keep on running this command.
    – dimas
    Commented Mar 1, 2013 at 6:09

From the lsof FAQ:

17.12.7 Why does lsof on my Solaris 7, 8 or 9 system say, "can't read namelist from /dev/ksyms?"

You're probably trying to use an lsof executable built for an earlier Solaris release on a 64 bit Solaris 7, 8 or 9 kernel. The output from lsof -v will tell you the build environment of your lsof executable. You should also have gotten a warning message that lsof is compiled for a different Solaris version than the one under which it is running -- something like this:

  lsof: WARNING: compiled for Solaris release X; this is Y

You need to build lsof on the system where you want to use it. For 64 bit Solaris 7, 8 and 9 you need a compiler that can generate 64 bit Solaris executables -- e.g., the Sun Workshop 5 C compiler or later, or a recent gcc version like 3.2.

  • Thanks for answering Gilles, unfortunately i cannot change anything in this environment as its owned by an organisation. So it seems that I can only use a combination of /proc/*/fd and some other unix command.
    – dimas
    Commented Mar 1, 2013 at 0:06

You must log in to answer this question.

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