Upload a file from your computer to the server scp ~/desktop/file. Simply use scp ~ will download the file to this directory. I typically use PuTTY (a looong time ago), a free telnet and SSH Client for Windows and Unix platforms. This will show you where is your default directory when you use SSH to the server. Overview of the most common basic SHELL commands. IF you are not sure what is the absolute path of your computer, just open a new SSH window, type CD ~, type PWD. More handy SSH commands: To compress one file or folder to a tar file tar -cvf archieve.tar file To compress files or folders excluding some directories tar -cvf archieve.tar file -exclude "directory" tar -cvf archieve.tar file -exclude "directory1" "directory2" To extract a tar file tar -xvf file.tar Download a file from server to your computer scp ~/desktop CHMOD – how to change file permission Command: chmod How to search for text within a file Command: grep How to search for a file starting within current directory Command: find. How to show the full path of the current directory Command: pwd 10. How to go to home directory Command: cd ~ 9. How to move into another directory Command: cd 8. Useful for checking if there are differences between local and remote files. Compare a remote file with a local file Command: ssh cat /path/to/remotefile | diff /path/to/localfile. This will output a list of all processes and connections currently running on the system. Similar to “ps -ef” it shows up which TCP connection the server is connecting to. Shows up active TCP connections Command: # ps -aux The PID is important when you wish to “kill” the process, and the CMD is used to start the process again 5. This will output a list of all processes currently running on the system. Command: # ps -efĬheck which processes are running on the server, which user started the process (UID), process ID (PID), and the command that started the process (CMD). Shows processes currently running on the system. The line representing the system clock currently used by the node is marked with an asterisk (*). Check for error messages Command: # ntpq -pĪ table of system clocks appears. The usage of the file system space should be less than 80%. Check free space of the system hard disk. The memory utilization (real – free)/real should be less than 70%. The total CPU usage should be less than 70%. The screen lists the 15 most active processes that are currently running on the node. For a single process, the CPU usage should be less than 40%. Check the physical free memory of the system Command: # topĬheck the node to make sure that no single process is consuming all of the available memory.Ĭheck the physical free memory of the system and whether the SWAP free memory meets the requirements. You already know what commands will work for specific scenario and it’s reusable and even automatable…ġ.
0 Comments
Leave a Reply. |