Archive for January, 2010

fuser - identify processes using files or sockets

In order to look up processes using TCP and UDP sockets, the corresponding name space has to be selected with the -n option. By default fuser will look in both IPv6 and IPv4 sock-ets. To change the default, behavior, use the -4 and -6 options. The socket(s) can be specified by the local and remote port, and the remote address. All fields are optional, but commas in front of missing fields must be present:

[lcl_port][,[rmt_host][,[rmt_port]]]

Either symbolic or numeric values can be used for IP addresses and port numbers.

fuser outputs only the PIDs to stdout, everything else is sent to stderr.

root@dell:~# fuser -nv tcp 25
USER PID ACCESS COMMAND
25/tcp: root 3926 F…. master

FILES

/proc location of the proc file system

EXAMPLES

fuser -km /home kills all processes accessing the file system /home in any way.

if fuser -s /dev/ttyS1; then :; else something; fi invokes something if no other process
is using /dev/ttyS1.

fuser telnet/tcp shows all processes at the (local) TELNET port.

SBDavid

find command numeric arguments

find command numeric arguments

Numeric arguments can be specified as:

+n for greater than n.

-n for less than n.

n for exactly n.

-amin n

File was last accessed n minutes ago.

-anewer file

File was last accessed more recently than file was modified. If file is a symbolic link and the -H option or the -L option is in effect, the access time of the file it points to is always used.

-atime n

File was last accessed n*24 hours ago. When find figures out how many 24-hour periods ago the file was last accessed, any fractional part is ignored, so to match -atime +1, a file has to have been accessed at least two days ago.

-cmin n

File’s status was last changed n minutes ago.

-cnewer file

File’s status was last changed more recently than file was modified.

-ctime n

File’s status was last changed n*24 hours ago. See the comments for -atime to understand how rounding affects the interpretation of file status change times.

Hardware Requirements for Parallels Virtuozzo Containers

Parallels Virtuozzo Containers for Linux

CPUs: x86, ia64, AMD64, EM64T, Itanium

Memory:
2 GB minimum. More recommended. The required amount depends on the total number of Containers you wish to run on the Node (minimum 50 MB per Container).

Hard disk space:20 GB or more free disk space. The required amount depends on the size of the software to be installed inside Containers.

SBDavid

VPS and Shared Hosting

VPS and Shared Hosting

VPS gives you a lot more control than shared hosting, it’s basically the same as having your own dedicated server as you have full control of what goes on. It’s also a lot more brandable than shared hosting.

To manage a VPS, you can use a VPS panel like SolusVM or VePortal where you can manage the VPS - including IPs, root password, hostname, turning the VPS on and off, etc

Kinds of device files in Linux operating systems

There are two general kinds of device files in Unix-like operating systems, known as character special files and block special files. The difference between them lies in how data written to them and read from them is processed by the operating system and hardware.

These together can be called device special files in contrast to named pipes, which are not connected to a device but are not ordinary files either.

Symbol Meaning
- Regular file
d Directory
l Link
c Special file
s Socket
p Named pipe
b Block device

« Prev - Next »