🚀 author: “Big Data Zen”
🚀 Column introduction: This column mainly shares Linux technology, will involve the common Linux command operation, common service applications and related operation and maintenance knowledge, as well as some Linux system in-depth analysis.
🚀 Fan benefit: Join the big data communication group of Xiaozen
🚀 Welcome to like 👍, collect ⭐, leave a message 💬
Telnet and SCP command usage between Linux servers
The Telnet command is used to test whether a port on a machine is accessible. Centos does not use this command by default. You need to install talent IP address +80To view80Port is clear (80Yum -y install xinetd Telnet Telnet -serverCopy the code
Telnet command:
Telnet IP address Port Application scenario: Test whether a port is accessibleCopy the code
SCP command: used to copy files or directories between servers
usage1SCP Directory where the local files are stored root@server IP address: directory where the local files are stored (root is also the user)Copy the code
Eg:192.16872.128./root/vmwareTools - for this machine10.2. 0-7259539.Copy the tar.gz file to192.16872.129.SCP /root/vmwaretools - (enter yes instead of y when prompted)10.2. 0-7259539.tar.gz root@192.16872.129.:/root/
Copy the code
Usage 2: Copy files from another machine to a local directory. SCP root@server IP address: Server destination directory Specifies the directory where files are stored on the local server
Eg:192.16872.129./root/vmwareTools - for this machine10.2. 0-7259539.Copy the tar.gz file to192.16872.128.Under /root/, the following command is in128SCP root@ running on the machine192.16872.129.:/root/VMwareTools-10.2. 0-7259539.tar.gz /root/
Copy the code
R parameter: recursive function (can copy directories)
Eg:128Scp-r vmware-tools-distrib root@ of the following operation192.16872.129.:/root/
Copy the code
Linux process management command ps -ef and ps aux details
Introduction: This section describes the functions of the ps command
The ps command is used to display information about all processes. Ps and grep are used together to search for a specific process
[root@localhost ~]# ps -ef | more
UID PID PPID C STIME TTY TIME CMD
root 2 0 0 Jul30 ? 00:00:00 [kthreadd]
root 3 2 0 Jul30 ? 00:00:06 [ksoftirqd/0]
root 5 2 0 Jul30 ? 00:00:00 [kworker/0:0H]
root 7 2 0 Jul30 ? 00:00:04 [migration/0]
root 8 2 0 Jul30 ? 00:00:00 [rcu_bh]
root 9 2 0 Jul30 ? 00:00:00 [rcuob/0]
root 10 2 0 Jul30 ? 00:00:00 [rcuob/1] UID: user ID PID: process ID PPID: parent process ID C: CPU usage STIME: process startup TIME TTY: TTY terminal TIME: total CPU usage since the process execution CMD: command to start the processCopy the code
[root@localhost ~]# ps aux | more
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2 0.0 0.0 0 0 ? S Jul30 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S Jul30 0:06 [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S< Jul30 0:00 [kworker/0:0H]
root 7 0.0 0.0 0 0 ? S Jul30 0:04 [migration/0]
root 8 0.0 0.0 0 0 ? S Jul30 0:00 [rcu_bh]
root 9 0.0 0.0 0 0 ? S Jul30 0:00 [rcuob/0]
root 10 0.0 0.0 0 0 ? S Jul30 0:00 [rcuob/1]
root 11 0.0 0.0 0 0 ? S Jul30 0:00 [rcuob/2] USER: which USER started the command PID: ID of a process %CPU: CPU usage %MEM: memory usage VSZ: total memory usage if a program resides in memory RSS: Current memory usage of a process TTY: TTY terminal STAT: Represents the state of the current process (S# In a dormant state; D# uninterruptible state; Z# zombie process; X# dead process)START: indicates the TIME when the COMMAND is started. TIME: indicates the total CPU usage since the process is executed. COMMAND: indicates the COMMAND used to START the processCopy the code
The ps -ef or ps aux command is usually executed to check whether our process has been started successfully, or to find the process number.