Sixth week of notes and sort out the wrong questions

Process management tools
kill command: sending a control signal to the process, in order to achieve process management, each corresponding to a digit
-------------------------- -------------------------------------------------- ----
the kill the -l to see which signals can be sent to process
1) SIGHUP without shutting down the process and let it reread its configuration file
2 SIGINT suspend running processes); equivalent to c + Ctrl
3) SIGQUIT equivalent to ctrl + 9) SIGKILL forced to kill a running process
15) terminate the running process SIGTERM
18) SIGCONT continue to operate
19) SIGSTOP back to sleep

Commonly used commands
kill -15 pid terminate
the kill pid
the kill -9 pid force kill
kill -15 $ (pidof ping)

Job Management

1, foreground job: The terminal starts, and has been dominated by the terminal after starting
a background job: be initiated by the terminal, but after the start into the background (release the terminal)

2, so that job runs in the background
(1) Ctrl + z allow running jobs
(2) does not start job COMMAND &

Although the background job is sent to the background, but it is still associated with the terminal; exit the terminal, will close background job. If desired sent back, the relationship with the terminal release
the nohup the COMMAND &> / dev / null &
Screen; the COMMAND
view the current terminal all jobs: jobs

Job Control:
fg [JOB_NUM]: the specified background job transferred back to the front desk
bg [JOB_NUM]: let sent to the background job continues to run in the background
kill [JOB_NUM]: Specifies the job termination

Running in parallel
are executed in parallel three shell script
(& ./test1.sh); (./ & test2.sh); (./ test3.sh &)
{./test1.sh & ./test2.sh & ./test3 .sh &}

Task Scheduler
Linux Task Scheduler, perform periodic tasks

1, the next point of time to perform a certain task
specified point in time at, perform a single task
batch system choose idle time to perform certain tasks here

2, periodically run a task
cron

at the task
at command: at [option] TIME

-V Display version information
-t time Time format [[CC] YY] MMDDhhmm [.SS]
the -l lists specified for the job in the queue waiting to run
-d to delete the specified job
-c view specific job tasks
-f / path / file read task specified file
-m when the task is completed, the user will send a message, even if there is no standard output

Finishing the wrong questions:
1, brief nslookup, dig, top, traceroute commands automatically for each Use?

nslookup: measuring whether the network DNS server can correctly implement the DNS command-line tool
dig: dns query tool
top: real-time view of system resources occupancy
traceroute: All path tracing data packets transmitted over the network when

2, respectively, see cpu, memory, io on usage of command?
Top, dstat, sar
as Free
iostat

3, how to view the current linux system status such as cpu, memory, load, version?
Top
as Free
Uptime
View System Version: cat / etc / redhat-release
core edition: uname -a

4, uses one command to view the destination time before the system started service listens end-connector?
netstat -tan

5. Using the command linux system statistics the number of connections establish state how much?
netstat -an | grep ESTABLISHED | wc -l

6, the top command interpretation and vmstat command?
top command: Dynamic real-time display of system performance
vmstat command: Static display system performance

7, crontab plan tasks, write: Wednesday 7-9 points every 5 minutes to perform it again a.sh files?
-e the crontab
/ 7-9. 5 *. 3 / bin / a.sh the bash

8, procedures and processes, the following __b__ is correct.
a. the program is dynamic, the process is static
b. is a dynamic process, the program is static
c. procedures and processes are dynamic
d. procedures and processes are static

9, how to set up the server ⼀ a week, Wednesday and Friday 1:00 automatically reboot?
-e the crontab
0. 1 * * l, 3,5 / sbin / reboot

10, load averages meaning in the top command in linux?
load average top command displays the latest one minute, five minutes and the average load of the system for 15 minutes. It is defined as the average load of the system within a certain time interval running average queue tree process (running on the CPU or how many processes waiting runs).

11, the timing of the mission plan, every morning 6:00 to 12:00, and start every time. 2 hours ⼀ times /usr/bin/httpd.sh how to achieve? How to back up regular tasks ⽣ production environment? (Timed task ⽣ production environment Using the default run under the root user)
crontab -e
0 6-12 / 2 * * * /usr/bin/httpd.sh
/ var / spoll / cron / root root After the scheduled task will be to develop generate this file, the backup file is backed up regular tasks.

12. Using the crontab write every Saturday night 23:00 synchronized time?
ntpdate -y install yum
crontab -e
00 * 23 * 6 ntpdate 172.20.0.1

Guess you like

Origin www.cnblogs.com/yorkzhy/p/11409917.html