Linux – How to inventory what software/roles a Linux server is “serving up” to clients

linux

Is there a way to identify what "client/server" processes/applications are running on a Linux server to know what the server's role or roles are?

I'm sure it might vary for different flavors of Linux and might be easier on some than on others.

As an admin, recently I've inherited a few Linux servers during an acquisition. I can tell they are running SAMBA, but beyond that I don't know where to look to find what kinds of software they might be serving up to various clients. In the Windows world I can sort of tell by the services that are running, the software that is installed, open ports, etc. Is there a decent way to do something similar in the Linux world that would help people like me determine what all the server does from a client/server role perspective?

Best Answer

Sure, there are a few good ways to get started.

One is to check out what ports are listening and open as you mentioned. For that I'd suggest one or more of the following:

lsof -i
netstat -lnp
nmap localhost

All give roughly the same information.

You could also consult the local firewall configuration for clues. For that look at:

iptables -L -n -v

You could also check who has been logging into the system and talk with those users. To do that, check:

last
who
w
finger

You might query the local package management system to determine which packages are installed. For example, on a RedHat style RPM system you could run:

rpm -qa --last

I'd suggest consulting any existing documentation. With any luck, the previous administrator has put something together.