In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "instructions for the use of Linux system management commands". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn the "instructions for the use of Linux system management commands"!
Shutdown command
The shutdown command, which safely shuts down or restarts the linux system, prompts all logged-in users on the system with a warning before the system shuts down. The command also allows the user to specify a time parameter, either a precise time or a time period from now on. The format of the exact time is hh:mm, which represents hours and minutes; the time period is represented by "+" and minutes. After the system executes the command, the data synchronization will be carried out automatically.
The general format of the command is: shutdown [options] [time] [warning message] the meaning of the options in the command is:
-k doesn't really turn it off, but just sends a warning message to all users.
-r restart immediately after shutdown.
-h do not restart after shutdown.
-f quickly shut down and skip fsck when rebooting.
-n shut down quickly without going through init program.
-c cancel an already running shutdown.
It is important to note that this command can only be used by superusers.
Free command
The free command displays information about system memory usage, how much memory is used, and how much memory is free.
Syntax:
The grammar is
Free [command switch] [- V]
Command switch:
-b displays memory usage in bytes-k shows memory usage in kb. -m displays memory usage in mb units. -s delay continuously outputs the usage of memory. Continuous display of memory usage at intervals of typing delay. -t displays the summary usage of memory.
Example:
Display memory size information:
Free total used free shared buffers cachedMem: 223740 219492 4248 0 3756 73212 + buffers/cache: 142524 81216Swap: 1052216 66732 985484
The free command displays all the memory information for the system, such as the total amount of memory used and the size of available content.
Use files to display memory information:
Cat / proc/meminfoMemTotal: 223740 kBMemFree: 8512 kBBuffers: 4432 kBCached: 67860 kBSwapCached: 15032 kBActive: 172484 kBInactive: 20168 kBHighTotal: 0 kBHighFree: 0 kBLowTotal: 223740 kBLowFree: 8512 kBSwapTotal: 1052216 kBSwapFree: 985488 kBDirty: 52 KBWriteback: 0 kBMapped: 166064 kBSlab: 14860 kBCommitted_AS: 541000 kBPageTables: 3260 kBVmallocTotal: 794616 kBVmallocUsed: 3056 kBVmallocChunk: 791084 kBHugePages_Total: 0HugePages_Free: 0Hugepagesize: 4096 kB
The above command displays memory usage information for the system.
Top command
Permissions: all users
Usage: top [-] [d delay] [Q] [c] [S] [s] [I] [n] [b]
Description: real-time display of the dynamics of process
Parameters:
D: change the update speed of the display, or press s in the conversational instruction line (interactive command)
Q: there is no delay in the display speed. If the user has the permission of superuser, top will be executed in the highest priority.
C: toggle display mode, there are two modes, one is to display only the name of the execution file, and the other is to display the full path and name S: cumulative mode, which accumulates the CPU time of the completed or missing dead child process
S: safe mode, cancel conversational instructions to avoid potential crisis
I: do not show any idle (idle) or useless (zombie) itinerary
N: the number of updates. After completion, you will exit top.
B: batch file mode, used with the "n" parameter, can be used to output the results of top to the file
Example:
Show ten updates and then exit
Top-n 10
Users will not be able to use conversational instructions to give commands on the itinerary:
Top-s
Enter the result of the update display twice into the file named top.log:
Top-n 2-b < top.log
At this point, I believe you have a deeper understanding of the "instructions for the use of Linux system management commands". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.