Monday, March 18, 2013

Single command to find out RAM(memory) size in Linux


You can use the command cat /proc/meminfo to get the memory details in the linux operating system.
But this gives much more information of memory.
If you need just the memory size , use the below command to get that.


cat /proc/meminfo | awk 'match($1,"MemTotal") == 1 {print $2}'

This gives the memory size in kilobytes(kb).
But I don't know if the format of /proc/meminfo varies among

Display Number of Processors on Linux






If you’ve just upgraded your Linux box, or you are wondering how many processors a remote server has, there’s a quick command you can use to display the number of processors. On Linux, /proc/cpuinfo contains all of the processor information for all current processors in your computer. This will include the speed, the amount of on-chip cache, processor type, and how many cores. Here’s the

Sunday, March 17, 2013

uudecode Command



The
uudecode
utility reads a file or standard input if no file is specified,
that includes data created by the
uuencode
utility.
The
uudecode
utility scans the input file, searching for
data compatible with the format specified in
uuencode
and attempts to create or overwrite the
file described by the data.
The pathname, file access permission bits
and contents for the file to be produced
are

uuencode Command






The
uuencode
utility writes an encoded version of
the named input file, or standard input if no
file
is specified,
to standard output.
The output is encoded using
the algorithm described in the STDOUT section and includes the
file access permission bits (in
chmod
octal or symbolic notation)
of the input file and the
decode_pathname,
for re-creation of the file on another
system that conforms

SUDO in UNIX


Sudo is a standard way to give users some administrative rights without giving out the root


password. Sudo is very useful in a multi user environment with a mix of server and
workstations. Simply call the command with sudo:

# sudo /etc/init.d/dhcpd restart                                   # Run the rc script as root
# sudo -u sysadmin whoami                                       # Run cmd as

Tuesday, March 12, 2013

Difference between /etc/hosts and /etc/resolv.conf


/etc/resolv.conf specifies the nameservers for resolver lookups, where it will actual use the DNS protocol for resolving the hostnames.
Typically the /etc/hosts file is used for administrative purposes such as backend and internal functions, which is substantially more isolated in scope, as only the local server will reference it it./etc/nsswitch.conf specifies the lookup order with the hosts

Sunday, March 10, 2013

Extracting snap.pax.Z file - AIX




 For basic dump analysis, this article is mostly interested in a dump image. Here, we cover how to extract the appropriate files from the snap package and then explain a methodical approach to examine the dump, and find the fundamental reason for a system crash. The dump file and the UNIX® file are in the dump subdirectory of the snap package.Though we are primarily focused on the dump image,

Saturday, March 9, 2013

Open Source with AIX




AIX has a large range of Open Source tools, and applications already
ported and packaged ready for you to install. This makes it far easier
and quick to get Open Source tools and applications working and useful
on AIX. All the big popular Open Source stuff is available. My
favourites that are in the first URL below are:


Apache - web server the one that runs the web
emacs - editor and so