1 |
Hi! |
2 |
|
3 |
Short version: Upgrades happen, libs get deleted/replaced; my |
4 |
script (links below) tells you what processes to restart. |
5 |
|
6 |
Long version: |
7 |
|
8 |
I've recently realized that many admins aren't aware of a problem |
9 |
when upgrading their systems. Usually, people are told to run |
10 |
revdep-rebuild and do sundry other stuff. But sometimes, a |
11 |
certain point is missed: deleted-but-mapped files. Yes, we all |
12 |
know that upgrading say OpenSSL or gnutls means that we should |
13 |
restart all the services that use those libraries. But sometimes, |
14 |
we might miss some obscure daemon or a job running in a screen |
15 |
(so looking at /etc/init.d doesn't help us). |
16 |
|
17 |
Fortunately, all the relevant information can be found in /proc: |
18 |
the per-process maps file lists files (and if they're deleted) |
19 |
and the cmdline file gives us the name of the processes. |
20 |
|
21 |
So it's a simple shell onliner, right? Yes, that can be done (and |
22 |
please refrain from posting your solution to that particular |
23 |
exercise). But Shell onliners tend to be forgotten, and robust |
24 |
they ain't, especially if you add in stuff like not listing a |
25 |
deleted shmem segment or similar stuff. |
26 |
|
27 |
To make a long posting boring: I've hacked up a Python script |
28 |
that does all that and prints out a nice summary. It's available |
29 |
from here: |
30 |
|
31 |
http://schwarzvogel.de/software-misc.shtml |
32 |
|
33 |
Or, for those who want to go to the tgz directly: |
34 |
|
35 |
http://schwarzvogel.de/pkgs/lib_users-0.1.tar.gz |
36 |
|
37 |
Comments/suggestions appreciated. |
38 |
|
39 |
Regards, |
40 |
Tobias |