Tuesday 6 June 2017

Linux

check Memory stats and CPU stat
Using ‘free’ & ‘vmstat’ command we can display the physical and virtual memory statistics respectively.With the help of ‘sar’/top  command we see the CPU utilization & other stats.
 check which ports are listening in my Linux Server ?
Use the Command ‘netstat –listen’ and ‘lsof -i’
upgrade Kernel in Linux ?
We should never upgrade Linux Kernel , always install the new New kernel using rpm command because upgrading a kenel can make your linux box in a unbootable state.
add & change the Kernel parameters ?
Ans: To Set the kernel parameters in linux , first edit the file ‘/etc/sysctl.conf’ after making the changes save the file and run the command ‘sysctl -p’ , this command will make the changes permanently without rebooting the machine.

 process states in Linux?

The following are the process states:

1. Running: This is a state where a process is either in running or ready to run.
2. Interruptible: This state is a blocked state of a process which awaits for an event or a signal from another process
3. Uninterruptible: It is also a blocked state. The process is forced to halt for certain condition that a hardware status is waited and a signal could not be handled.
4. Stopped: Once the process is completed, this state occurs. This process can be restarted
5. Zombie: In this state, the process will be terminated and the information will still be available in the process table.
Dead process is called a zombie. The processes will die eventually at the time when they become zombies. A dead process cannot be killed. The parent process will send a signal to the operating system that is not needed the zombie by using wait () system call.

No comments:

Post a Comment