pfiles

There are two nice changes to the pfiles tool. Sometimes it’s really useful to know what files were open when a process threw a core dump. With Solaris 11.4 pfiles got the ability to work on such core files.

root@batou:~# gcore 1161
gcore: core.1161 dumped
root@batou:~# pfiles core.1161 
1161:   /usr/lib/inet/sendmail -bl -q15m
  Current rlimit: 65536 file descriptors
   0: S_IFCHR mode:0666 dev:16381,0 ino:61865992 uid:0 gid:3 rdev:118,2
      O_RDONLY|O_LARGEFILE
      /devices/pseudo/mm@0:null
      offset:0 
   1: S_IFCHR mode:0666 dev:16381,0 ino:61865992 uid:0 gid:3 rdev:118,2
      O_WRONLY|O_LARGEFILE
      /devices/pseudo/mm@0:null
      offset:0 
   2: S_IFCHR mode:0666 dev:16381,0 ino:61865992 uid:0 gid:3 rdev:118,2
      O_WRONLY|O_LARGEFILE
      /devices/pseudo/mm@0:null
      offset:0 
[...]
   8: S_IFREG mode:0600 dev:16374,1 ino:62776832 uid:0 gid:25 size:38 
      O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE
      advisory write lock set by process 1161
      /system/volatile/sendmail.pid
      offset:38 
root@batou:~#


The second change to the pfiles is how the tool gathers the information of a running process. Up to 11.3 the process was stopped for a short moment while pfiles collected the information. In Solaris 11.4 this isn’t done any longer.