Archive for February, 2010

How to create a range of ip addresses on ethx

Create a range file in /etc/sysconfig/network-scripts

Example:

#vi ifcfg-eth0-range1

Insert the following

DEVICE=eth0
BOOTPROTO=static
HWADDR=00:04:75:D4:C8:F9
IPADDR_START=192.168.0.6
IPADDR_END=192.168.0.10
CLONENUM_START=1
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
CLONENUM_START — interface clone number to start using for this range. # eg “1″

Which would start at eth0:1

SBDavid

How to enable IP forwarding

How to enable IP forwarding

To enable IP packet forwarding please edit /etc/sysctl.conf with your editor of choice and set:

#Controls IP packet forwarding

net.ipv4.ip_forward = 1

You can then verify your settings with:

/sbin/sysctl -p

How to get info about threads and security

To get info about threads:

ps -eLf
ps axms

To get security info:

ps -eo euser,ruser,suser,fuser,f,comm,label
ps axZ
ps -eM
SBDavid

How to sort the selected processes

Here are the different keywords that may be used to control the output format (e.g. with option -o) or to sort the selected processes with the GNU-style –sort option.

For example:

ps -eo pid,user,args –sort user

This version of ps tries to recognize most of the keywords used in other implementations of ps. The following user-defined format specifiers may contain spaces: args, cmd, comm, command, fname, ucmd, ucomm, lstart, bsdstart, start.

ps displays information about a selection of the active processes. If you want a repetitive update of the selection and the displayed information, use top(1) instead.

ps - report a snapshot of the current processes.

To see every process with a user-defined format:

ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
ps -eopid,tt,user,fname,tmout,f,wchan

« Prev - Next »