Monitoring of Linux Server & Asterisk Server.



MONITORING OF  LINUX SYSTEM

[1] top : top is a command that neatly list all processes with valuable
info sort by CPU and memory usage.
'top' provides lots of information on the processes running, including the
percentage of the cpu and the memory being consumed by that process, who
'owns' the process and it's pid (Process ID), it also shows the output of
'uptime' and a summary of memory usage, similar to 'free'. The output of
'top' is full screen, and refreshes itself frequently (or at user definable
intervals).
#top



[2] To see last shut down time Of RHEL System:

#last -x|grep shutdown | head -1

[3] To see last reboot history of RHEL System.
#last reboot


[4] W command is use to see the Login Linux user time.
It shows the uptime of the linux system
#w
#w root



[5] netstat -tulpn command to display listening sockets/ports
and associated program.
#netstat -tulpn



[6] control the service :
The ntsysv command is a simple interface for configuring
runlevel services which are also configurable through chkconfig
command. It allows to control which services are
started when the system boots up:
#ntsysv


The rcconf command under Debian / Ubuntu Linux allows you to
control which services are started when the system boots up or
reboots.
#rcconf

[7] uname command :
uname -r: Print the kernel release
#uname -r
uname -v: Showing kernel version:
#uname -v
uname -o : print the operating system
#uname -o
uname -a : print all information
#uname -a
[8] To see list of enable port:
#nmap ‘IP address’
[9] who Command to see who is on the system.
#who

[10] df command to view disk usage and we'll be shown disk usage for
all mounted filesystems in 1K blocks.
#df
Check available space on the hard drive in human readable format.
#df –h

[11] du command:
Now that To know how much space has been used on a filesystem
how can you find out where that data is?
To view usage by a directory or file we can use du. Unless we specify
a filename du will act recursively
Check disk usage for a specific folder:
#du -sh
#du file.txt
130 file.txt
In human readable format.
#du h file.txt
1.2M file.txt

[12] free command shows information about the machine's memory.
This includes physical memory (RAM), swap as well as the shared memory
and buffers used by the kernal. All measurements are in Kb.
#free
To see Total RAM with Free avliable.
#free –k
Display shows how much memory is being used in kilobytes,
because we specified the -k option.
#free –m

[13] ps command to see current working process.
#ps

[14] The 'kill' command is complementary to the 'ps' command as it
will allow you to terminate a process revealed with the previous command.
In cases where a process is not responding, you would use the following
syntax to effectively kill it:
‘Kill-9 pid’
where 'pid' is the Process ID (PID) that 'ps' displays for each task.


[15] ls commands:
To see list of all files with hidden files.
#ls -al
To see the largest files on filsystem.
#ls -lS
[16] Finds all files over 20,000KB (roughly 20MB) in size and presents
their names and size in a human readable format:
#find . -size +20000k -exec du -h {} \;

[17] To search the file.
#locate ‘file name ‘

[18] Shutdown the system.
# shutdown r now.
[19] Reboot the system.
#reboot

MONITORING OF ASTERISK SERVER

Start GUI for asterisk:
Run the following command on terminal to the asterisk
server with a console.
# asterisk –r
or
#asterisk -vvvvr
For ubuntu:
#asterisk –vvvvvcc

Note: Asterisk 1.4.0 CLI commands:

[1]:- Core related commands:
core show channels - Display information on channels.


core show channel - Display information on a specific channel.
core show channeltypes - List available channel types.


core show channeltype - Give more details on that channel type.
core show uptime - Show uptime information of asterisk server.



core show license - Show the license(s) for this copy of Asterisk.



core show file formats - Displays file formats.


core show codecs - Displays a list of codecs.


core show codec - Shows a specific codec.
[2]:- PRI command:
pri show spans - Displays PRI Information.
[3]:- restart gracefully - Restart Asterisk gracefully
[4] :- restart now - Restart Asterisk immediately.
[5]:- stop gracefully - Gracefully shut down Asterisk.
[6]:- stop now - Shut down Asterisk immediately.
[7]:- help - Display help list, or specific help on a command.
[8]:- Manager commands:
manager show commands - List manager interface commands.


manager show users - List configured manager users.


manager show user - Display information on a specific manager user.
[9]:- moh reload - Music on Hold.
[10]:- moh show classes - List MOH classes.
[11]: exit - Closes the asterisk CLI console (command-line interface).
[12]: dialplan show - Show dialplan.
[13]: dialplan reload – This command is used when we want to change in
extension.conf so we need to reload extensions.
[14]: manager reload - This command is used when we want to change in
manager.conf so we need to reload.
[15]: sip reload - This command is used when we want to change in sip.conf
so we need to reload.
[16]: dialplan remove extension - Remove a specified extension.

Thanks,
 

Comments

  1. Thanks for the useful information.Your blog is really informative.
    Web apps24x7 have global monitoring station to use check your server status.Download this
    https://play.google.com/store/apps/details?id=com.webapps.webapps

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Read Excel File in VC++....

Window could not start the Apache tomcat 6 on Local Computer.For more information, review the System Events Logs.If this is a non-Microsoft service,contact service vendor, and refer to service-specific error code 0.

ORACLE DBA INTERVIEW QUESTION & ANSWERS