Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am doing a audit on some Linux servers about 40.
One off the recuirments is a list of Applications currently
running on each server.
Does anyone have a command that I can use to show the required
info?
A good start would be to simply run "ps -ef" and see what processes are running. You could do "ps -ef |grep -v root" to determine those processes not run by the root user. Generally speaking processes run by root are system processes and applications have their own admin user. Unfortunately this is not always the case - many people badly configure systems and have root running applications it shouldn't. There are also special cases where the first process is running as root and it then spawns subprocesses as another user. (Properly configured Apache is a good example of that.)
Many packages on Linux are installed by a package manager and these are different for the various distros. You could use your package manager to show you what packages are there and then try to determine which of these are just system (required to support the application) or are actually the main point of the server. For example you could run "rpm -qa" on a RedHat/Fedora/CentOS system to see all RedHat Package Manager (RPM) packages.
Some packages however are installed by other means - via an extracted compressed tar bundle and/or compiled locally on the server.
I guess it would depend on what the definition of "application" is in this context. Were I charged with doing such an audit my definition would be:
1) Primary purpose application of the system whether it is free or not.
2) Any commercial application (one you pay money for).
3) Some other applications critical to the business whether free or not.
I suspect the main interest in such an audit is number 2 so I would be sure to list any free applications as such.
So if the primary purpose were to be a web server I might list Apache as the application (seen as httpd in ps output) but note that it was Free Open Source Software (FOSS). If I were running MySQL as a primary database server I would list MySQL.
If I were running say Oracle which ships with Apache I would list the Oracle product but not Apache as I would consider it part of Oracle install. (Similarly Oracle is heavily dependent on Java so I wouldn't list Java as it is FOSS.)
If you were running JBOSS as supported by RedHat you might list that as an application even though it is part of your web infrastructure.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.