From: "Jeffrey E. Hundstad" <jeffrey.hundstad@mnsu.edu>
To: "Jeffrey E. Hundstad" <jeffrey@hundstad.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: /proc/[0-9]*/maps where did the (deleted) status go?
Date: Sun, 02 Nov 2003 02:17:47 -0600 [thread overview]
Message-ID: <3FA4BDAB.9080805@mnsu.edu> (raw)
In-Reply-To: <3FA47EAF.3070802@hundstad.net>
I'm going to fine tune this report a little bit. The behavior change is
more subtle than I at first thought.
In 2.4: file that has been deleted, and is mapped will show as deleted
in the maps file
In 2.6: file that has been deleted, and is mapped will show as deleted
in the maps file
In 2.4: file that has been moved, and is mapped will show as deleted in
the maps file
In 2.6: file that has been moved, and is mapped will show the new name
in the maps file
While I don't see this as a bug in the kernel it certainly is a
regression difference. ...and I'd still like a way of tracking when the
filename changes. If anyone has a good suggestion let me know.
As a side note... this is the output of a file that has actually been
deleted. It looks different from the 2.4 version (note the "\040" is
something new):
40018000-40019000 rw-s 00000000 03:04 13355559
/home/j3gum/src/mmap/testfile.old\040(deleted)
Jeffrey E. Hundstad
Jeffrey E. Hundstad wrote:
> 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
>
>
next prev parent reply other threads:[~2003-11-02 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2003-11-02 8:47 ` Andrew Morton
2003-11-02 8:58 ` viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FA4BDAB.9080805@mnsu.edu \
--to=jeffrey.hundstad@mnsu.edu \
--cc=jeffrey@hundstad.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox