Sep 302014
 

tux-terminal.jpg
Article by Daniel Miessler first posted on his blog

lsof is the sysadmin/security über-tool. I use it most for getting network connection related information from a system, but that’s just the beginning for this powerful and too-little-known application. The tool is aptly called lsof because it “lists openfiles“. And remember, in UNIX just about everything (including a network socket) is a file.

Interestingly, lsof is also the Linux/Unix command with the most switches. It has so many it has to use both minuses andpluses.

usage: [-?abhlnNoOPRstUvV] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]]
 [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]]
 [-p s] [+|-r [t]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]

As you can see, lsof has a truly staggering number of options. You can use it to get information about devices on your system, what a given user is touching at any given point, or even what files or network connectivity a process is using.

For me, lsof replaces both netstat and ps entirely. It has everything I get from those tools and much, much more. So let’s look at some of its primary capabilities:

Continue reading »

Flattr this!

Sep 072011
 

Article by Dominique Cimafranca first published on his blog regarding Ubuntu, and Linux in general.

A simple but effective procedure for evaluating security on your computer is to check what sites it’s connecting to, or what sites are connecting to it. Most critical malware nowadays turn computers into zombies for botnets — typically zombified hosts will connect to a central server using IRC. Or it could be that you’re inadvertently running a program that’s listening for Internet requests. In any case, it’s good to check these connections.
Continue reading »

Flattr this!

Jan 162011
 

tuxrayI had recently problems with servers running application server Java and suddenly began to see strange errors like “broken pipe” or exausted resources, this is often due to the high number of open files that a modern server can bind especially compared to the default Linux systems that is still standing at 1024.

Let’s see how many open files are present on our system and how to resolve, or better to prevent this problem.
Continue reading »

Flattr this!