public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* /proc/[0-9]*/maps where did the (deleted) status go?
@ 2003-11-02  3:49 Jeffrey E. Hundstad
  2003-11-02  7:52 ` Andrew Morton
  2003-11-02  8:17 ` Jeffrey E. Hundstad
  0 siblings, 2 replies; 5+ messages in thread
From: Jeffrey E. Hundstad @ 2003-11-02  3:49 UTC (permalink / raw)
  To: linux-kernel

Hello,

In the 2.4.x kernels the /proc/[process id]/maps file contains that 
processes current mappings.  This is also true with 2.6.0-test9 but I've 
noticed a difference.  It is a feature I'll miss.  In the 2.4 kernels 
when a file is mapped but no longer exists (because it has been removed) 
the mapping line would contain the text "(deleted)" after it.

I've used this feature after I've updated libraries on my system.  I ran 
a little scriptlet (see below).  It'd tell me which processes were 
running with the old copy of the library.  This way I restart those 
processes.

Is this a feature that can be restored, or perhaps there's a better way 
to do it.  Let me know?


---- scriptlet library-restart-app follows:
#!/bin/bash
for i in `find /proc/ -mindepth 2 -maxdepth 2 -name "maps" | xargs grep 
-a deleted | grep -a -E -v /SYSV[0-9a-z]{8} |grep -a -v /dev/zero | cut 
-d ':' -f1 | cut -d '/' -f3 | sort | uniq | sed -e 
's/\(.*\)/\/proc\/\1\/cmdline/'`;do echo -n "`echo $i| cut -d '/' -f3` 
";cat $i|tr "\000" "\n" |head -1;done---- ---- scriptlet 
library-restart-app ends


-- 
jeffrey hundstad



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-11-02  8:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-02  3:49 /proc/[0-9]*/maps where did the (deleted) status go? Jeffrey E. Hundstad
2003-11-02  7:52 ` Andrew Morton
2003-11-02  8:17 ` Jeffrey E. Hundstad
2003-11-02  8:47   ` Andrew Morton
2003-11-02  8:58     ` viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox