* [gentoo-server] "restart daemon" notification
@ 2005-06-01 23:09 Timo Veith
2005-06-01 23:44 ` Timo Veith
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Timo Veith @ 2005-06-01 23:09 UTC (permalink / raw
To: gentoo-server
Hi all,
there was a message or a thread on a gentoo list for which I am
searching. I already tried some keywords on google and on
http://www.mail-archive.com, bu had no luck. Maybe some here can remember.
It was about updating software and figuring out whether a certain daemon
has to be restarted because libs could have changed or even binary of
the daemon itself was overwritten etc. IIRC it was a combination of
commands. lsof could be one of them but I am not sure. If nobody
remembers such a message, maybe you can help me writing a script for
that? I would start with something like "for every process do check if
every shared library still exists" or so.
I think this is an issue which should be taken care of by ebuild
maintainers. Not that emerge should do a restart but maybe a einfo
message? I mean it may not always be obvious because which and how many
rc-scripts are to be fired up with "restart". I don't have a good
example right now. Maybe clamav? It has two parts ...
Thanks in advance
Timo
--
gentoo-server@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-server] "restart daemon" notification
2005-06-01 23:09 [gentoo-server] "restart daemon" notification Timo Veith
@ 2005-06-01 23:44 ` Timo Veith
2005-06-02 12:31 ` Patrick Witte
2005-06-03 2:06 ` Anthony Gorecki
2 siblings, 0 replies; 10+ messages in thread
From: Timo Veith @ 2005-06-01 23:44 UTC (permalink / raw
To: gentoo-server
Timo Veith wrote:
> Maybe clamav? It has two parts ...
That was a bad example. The ebuild author mentions a restart. Sorry :)
I think the other message was more about libraries which were updated
and so other programs which depend on them should also be restarted.
Timo
--
gentoo-server@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-server] "restart daemon" notification
2005-06-01 23:09 [gentoo-server] "restart daemon" notification Timo Veith
2005-06-01 23:44 ` Timo Veith
@ 2005-06-02 12:31 ` Patrick Witte
2005-06-02 16:16 ` Ben Munat
2005-06-03 2:06 ` Anthony Gorecki
2 siblings, 1 reply; 10+ messages in thread
From: Patrick Witte @ 2005-06-02 12:31 UTC (permalink / raw
To: gentoo-server
Timo Veith wrote:
> It was about updating software and figuring out whether a certain daemon
> has to be restarted because libs could have changed or even binary of
> the daemon itself was overwritten etc. IIRC it was a combination of
> commands. lsof could be one of them but I am not sure. If nobody
> remembers such a message, maybe you can help me writing a script for
> that? I would start with something like "for every process do check if
> every shared library still exists" or so.
# lsof | grep DEL
will output a list 'open' files that have been deleted or changed in
filesystem but are still kept in memory.
Patrick
--
gentoo-server@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-server] "restart daemon" notification
2005-06-02 12:31 ` Patrick Witte
@ 2005-06-02 16:16 ` Ben Munat
2005-06-02 16:25 ` Ned Ludd
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Ben Munat @ 2005-06-02 16:16 UTC (permalink / raw
To: gentoo-server
Patrick Witte wrote:
>
> # lsof | grep DEL
>
> will output a list 'open' files that have been deleted or changed in
> filesystem but are still kept in memory.
>
That lsof is pretty neat... any idea why I would have dozens of files open -- across many
different processes -- under /var/tmp/portage? Isn't that directory just used while emerging?
b
--
gentoo-server@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-server] "restart daemon" notification
2005-06-02 16:16 ` Ben Munat
@ 2005-06-02 16:25 ` Ned Ludd
2005-06-03 3:29 ` Ben Munat
2005-06-02 16:28 ` Javier Barrio
2005-06-02 20:14 ` Patrick Witte
2 siblings, 1 reply; 10+ messages in thread
From: Ned Ludd @ 2005-06-02 16:25 UTC (permalink / raw
To: gentoo-server
On Thu, 2005-06-02 at 09:16 -0700, Ben Munat wrote:
> Patrick Witte wrote:
> >
> > # lsof | grep DEL
> >
> > will output a list 'open' files that have been deleted or changed in
> > filesystem but are still kept in memory.
> >
>
> That lsof is pretty neat... any idea why I would have dozens of files open -- across many
> different processes -- under /var/tmp/portage? Isn't that directory just used while emerging?
This might be a security problem.
Can you send me the output of lsof /var/tmp/portage
--
Ned Ludd <solar@gentoo.org>
--
gentoo-server@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-server] "restart daemon" notification
2005-06-02 16:16 ` Ben Munat
2005-06-02 16:25 ` Ned Ludd
@ 2005-06-02 16:28 ` Javier Barrio
2005-06-02 20:14 ` Patrick Witte
2 siblings, 0 replies; 10+ messages in thread
From: Javier Barrio @ 2005-06-02 16:28 UTC (permalink / raw
To: gentoo-server
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
> That lsof is pretty neat... any idea why I would have dozens of files open -- across many
> different processes -- under /var/tmp/portage? Isn't that directory just used while emerging?
That doesn't happen on any of my five gentoo production servers. Weird.
--
Por una UE sin PATENTES - http://EuropeSwPatentFree.hispalinux.es
GnuPG key ID 0x6D2FF8B5 @ pgp.escomposlinux.org
Linux/BSD BOFH - http://anurix.com/
http://fluzo.org/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-server] "restart daemon" notification
2005-06-02 16:16 ` Ben Munat
2005-06-02 16:25 ` Ned Ludd
2005-06-02 16:28 ` Javier Barrio
@ 2005-06-02 20:14 ` Patrick Witte
2 siblings, 0 replies; 10+ messages in thread
From: Patrick Witte @ 2005-06-02 20:14 UTC (permalink / raw
To: gentoo-server
Ben Munat wrote:
> Patrick Witte wrote:
> >
>
>> # lsof | grep DEL
>>
>> will output a list 'open' files that have been deleted or changed in
>> filesystem but are still kept in memory.
>>
>
> That lsof is pretty neat... any idea why I would have dozens of files
> open -- across many different processes -- under /var/tmp/portage?
> Isn't that directory just used while emerging?
>
> b
AFAIK # lsof | grep DEL should give you only 'files' like /dev/zero or
/SYSV00000000, right?
Patrick
--
gentoo-server@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-server] "restart daemon" notification
2005-06-01 23:09 [gentoo-server] "restart daemon" notification Timo Veith
2005-06-01 23:44 ` Timo Veith
2005-06-02 12:31 ` Patrick Witte
@ 2005-06-03 2:06 ` Anthony Gorecki
2005-06-03 15:24 ` Timo Veith
2 siblings, 1 reply; 10+ messages in thread
From: Anthony Gorecki @ 2005-06-03 2:06 UTC (permalink / raw
To: gentoo-server
On Thu, 02 Jun 2005 01:09:48 +0200, Timo Veith wrote:
> It was about updating software and figuring out whether a certain daemon
> has to be restarted because libs could have changed or even binary of
> the daemon itself was overwritten etc.
Why not just hook Portage's emerge process? The hook could be configured to
automatically restart the associated init.d files of any emerged package. As to
the libraries, `equery d PACKAGE` could be used to see which programs need to
be restarted.
I have the same interest in automatic restarts; if I ever find the time, I'm
planning to implement something similar to the above described process.
--
Anthony Gorecki
Ectro-Linux Foundation
--
gentoo-server@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-server] "restart daemon" notification
2005-06-02 16:25 ` Ned Ludd
@ 2005-06-03 3:29 ` Ben Munat
0 siblings, 0 replies; 10+ messages in thread
From: Ben Munat @ 2005-06-03 3:29 UTC (permalink / raw
To: gentoo-server
Ned Ludd wrote:
> On Thu, 2005-06-02 at 09:16 -0700, Ben Munat wrote:
>
>>Patrick Witte wrote:
>> >
>>
>>># lsof | grep DEL
>>>
>>>will output a list 'open' files that have been deleted or changed in
>>>filesystem but are still kept in memory.
>>>
>>
>>That lsof is pretty neat... any idea why I would have dozens of files open -- across many
>>different processes -- under /var/tmp/portage? Isn't that directory just used while emerging?
>
>
> This might be a security problem.
> Can you send me the output of lsof /var/tmp/portage
>
Well that's weird: I get nothing for lsof /var/tmp/portage. But if I do just lsof without
args, I get hundreds of lines of output. Some of it looks like legitamte reports of open
files for daemons I have running. But there are also many, many lines like below... all
refering to non-existent files under /var/tmp/portage.
Would love to hear what this is about.
b
Here's some sample output; three chunks from different sections of the output:
authdaemo 1706 root mem REG 3,3 3091732
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libnsl-2.3.4.so\040(deleted) (stat: No
such file or directory)
authdaemo 1706 root mem REG 3,3 1251304
/var/tmp/portage/openssl-0.9.7e-r1/image/usr/lib/libssl.so.0.9.7\040(deleted) (stat: No
such file or directory)
authdaemo 1706 root mem REG 3,3 1251301
/var/tmp/portage/openssl-0.9.7e-r1/image/usr/lib/libcrypto.so.0.9.7\040(deleted) (stat: No
such file or directory)
authdaemo 1706 root mem REG 3,3 3091917
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libnss_compat-2.3.4.so\040(deleted)
(stat: No such file or directory)
authdaemo 1706 root mem REG 3,3 3091878
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libnss_nis-2.3.4.so\040(deleted) (stat:
No such file or directory)
authdaemo 1706 root mem REG 3,3 3091937
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libnss_files-2.3.4.so\040(deleted)
(stat: No such file or directory)
...
ntpd 1941 ntp mem REG 3,3 3091937
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libnss_files-2.3.4.so\040(deleted)
(stat: No such file or directory)
ntpd 1941 ntp mem REG 3,3 3091877
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libm-2.3.4.so\040(deleted) (stat: No
such file or directory)
ntpd 1941 ntp mem REG 3,3 1251301
/var/tmp/portage/openssl-0.9.7e-r1/image/usr/lib/libcrypto.so.0.9.7\040(deleted) (stat: No
such file or directory)
ntpd 1941 ntp mem REG 3,3 3091733
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libc-2.3.4.so\040(deleted) (stat: No
such file or directory)
ntpd 1941 ntp mem REG 3,3 3091879
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libdl-2.3.4.so\040(deleted) (stat: No
such file or directory)
ntpd 1941 ntp mem REG 3,3 3090143
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libnss_dns-2.3.4.so\040(deleted) (stat:
No such file or directory)
ntpd 1941 ntp mem REG 3,3 3091734
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libresolv-2.3.4.so\040(deleted) (stat:
No such file or directory)
ntpd 1941 ntp mem REG 3,3 3091917
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libnss_compat-2.3.4.so\040(deleted)
(stat: No such file or directory)
ntpd 1941 ntp mem REG 3,3 3091732
/var/tmp/portage/glibc-2.3.4.20040808-r1/image/lib/libnsl-2.3.4.so\040(deleted) (stat: No
such file or directory)
...
mysqld 31977 mysql mem REG 3,3 5612824
/var/tmp/portage/glibc-2.3.4.20041102-r1/image/lib/librt-2.3.4.so\040(deleted) (stat: No
such file or directory)
mysqld 31977 mysql mem REG 3,3 29760 164499 /lib/libwrap.so.0.7.6
mysqld 31977 mysql mem REG 3,3 5612957
/var/tmp/portage/glibc-2.3.4.20041102-r1/image/lib/libdl-2.3.4.so\040(deleted) (stat: No
such file or directory)
mysqld 31977 mysql mem REG 3,3 1251304
/var/tmp/portage/openssl-0.9.7e-r1/image/usr/lib/libssl.so.0.9.7\040(deleted) (stat: No
such file or directory)
mysqld 31977 mysql mem REG 3,3 1251301
/var/tmp/portage/openssl-0.9.7e-r1/image/usr/lib/libcrypto.so.0.9.7\040(deleted) (stat: No
such file or directory)
mysqld 31977 mysql mem REG 3,3 5612802
/var/tmp/portage/glibc-2.3.4.20041102-r1/image/lib/libpthread-0.10.so\040(deleted) (stat:
No such file or directory)
mysqld 31977 mysql mem REG 3,3 65168 4078321 /lib/libz.so.1.2.2
mysqld 31977 mysql mem REG 3,3 5610555
/var/tmp/portage/glibc-2.3.4.20041102-r1/image/lib/libcrypt-2.3.4.so\040(deleted) (stat:
No such file or directory)
mysqld 31977 mysql mem REG 3,3 5612813
/var/tmp/portage/glibc-2.3.4.20041102-r1/image/lib/libnsl-2.3.4.so\040(deleted) (stat: No
such file or directory)
mysqld 31977 mysql mem REG 3,3 4662822
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/libstdc++.so.5.0.7\040(deleted) (stat: No such
file or directory)
mysqld 31977 mysql mem REG 3,3 5612955
/var/tmp/portage/glibc-2.3.4.20041102-r1/image/lib/libm-2.3.4.so\040(deleted) (stat: No
such file or directory)
mysqld 31977 mysql mem REG 3,3 4662861
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/libgcc_s.so.1\040(deleted) (stat: No such file or
directory)
mysqld 31977 mysql mem REG 3,3 5612814
/var/tmp/portage/glibc-2.3.4.20041102-r1/image/lib/libc-2.3.4.so\040(deleted) (stat: No
such file or directory)
mysqld 31977 mysql mem REG 3,3 5612995
/var/tmp/portage/glibc-2.3.4.20041102-r1/image/lib/libnss_compat-2.3.4.so\040(deleted)
(stat: No such file or directory)
--
gentoo-server@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-server] "restart daemon" notification
2005-06-03 2:06 ` Anthony Gorecki
@ 2005-06-03 15:24 ` Timo Veith
0 siblings, 0 replies; 10+ messages in thread
From: Timo Veith @ 2005-06-03 15:24 UTC (permalink / raw
To: gentoo-server
Am Freitag 03 Juni 2005 04:06 schrieb Anthony Gorecki:
> Why not just hook Portage's emerge process? The hook could be
> configured to automatically restart the associated init.d files of any
> emerged package. As to the libraries, `equery d PACKAGE` could be used
> to see which programs need to be restarted.
>
> I have the same interest in automatic restarts; if I ever find the
> time, I'm planning to implement something similar to the above
> described process.
>
Automatic restarts of daemons is not good I think. At least not as long as
the config files of the daemons which would be restarted are checked for
consistency with the newer version. I would always do this manually, so I
can step in if something bad happens.
As far as the libraries are concerned a restart of a depending daemon
could happen automatically. It's config files wouldn't have changed. Also
it is not likely that a restart would fail. If you stay away from ~arch
at least. :)
Initially I wrote about a notification. Maybe equery d PACKAGE and lsof |
grep DEL are a good start for watching what happens after an update.
Thanks for your replies.
Timo
--
gentoo-server@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-06-03 15:24 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-01 23:09 [gentoo-server] "restart daemon" notification Timo Veith
2005-06-01 23:44 ` Timo Veith
2005-06-02 12:31 ` Patrick Witte
2005-06-02 16:16 ` Ben Munat
2005-06-02 16:25 ` Ned Ludd
2005-06-03 3:29 ` Ben Munat
2005-06-02 16:28 ` Javier Barrio
2005-06-02 20:14 ` Patrick Witte
2005-06-03 2:06 ` Anthony Gorecki
2005-06-03 15:24 ` Timo Veith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox