Determining the version of a packaged process on linux
It’s easy to know which version of a package is installed on a linux distro:
package-manager info <packagename>
i.e.:
yum info ntp
However, is there a ‘linux convention’ sort of way to know what the package version of a running process is?
The potential situation is that the act of just installing a package is not a guarantee that a process started by it is stopped and restarted (it’s a common convention; but no guarantee!). So, I’m curious if there is a way to ascertain the version of the process… which is not necessarily the version of the package currently installed that made the process available.
I believe you are looking for something similar to the checkrestart tool which is part of the debian-goodies package. It basically uses looks at all the running processes and determines if they are referring to deleted files. It then correlates this to the package names by searching for the files in the package database. Then it tells you which services need to be restarted.
If you aren’t running a Debian based distribution, then I suspect you could download the source (python) and try to adapt the tool to your environment. Or you could just figure out what it is doing and call lsof directly.
Here is a version somebody created for Gentoo.
Check more discussion of this question.
No related posts.
Leave a comment
Recent Posts
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?
- Can Windows RDC admin users be immune from being kicked?
- Domain Administrators account policy (After PCI audit)





