Three tips for improving Linux management efficiency
Source: Internet
Author: User
Three tips for improving Linux management efficiency administrators should follow some management skills to improve Linux management efficiency. Here are three tips for improving Linux management efficiency: unmount the unresponsive DVD drive, restore the problematic screen, and collaborate on the screen. I believe they will improve the efficiency of Linux management by administrators. administrators should follow some management skills to improve the efficiency of Linux management. here we will briefly introduce three tips on Linux management efficiency: unmount the unresponsive DVD drive, restore the problematic screen, and collaborate on the screen. I believe they will improve the administrator's efficiency. Tip 1: new experiences with unresponding DVD drive networks: it will pop up immediately when you press the Eject button on the server (running the Redmond-based operating system) DVD drive. He then complained that in most enterprise Linux servers, if a process is run in that directory, the pop-up will not happen. As a long-term Linux administrator, I will restart the machine. If I don't know what is running and why the DVD drive is not released, I will pop up the disk. However, this is very inefficient. The following describes how to find the process of keeping the DVD drive and easily pop up the DVD drive: first simulate it. Put the disk in the DVD drive, open a terminal, and load the DVD drive: The following code snippet: # mount/media/cdrom # cd/media/cdrom # while [1]; do echo "All your drives are belong to us! "; Sleep 30; done now opens the second terminal and tries to pop up the DVD drive: The following is the code snippet: # eject will get the following message: umount:/media/cdrom: device is busy. before releasing the device, let's find out who is using it. The following code snippet: # The fuser/media/cdrom process is running. it is actually our error that the disk cannot be popped up. Now, if you are the root user, you can terminate the process at will: # fuser-k/media/cdrom. now you can unmount the drive: The following is the code snippet: # eject fuser is normal. Tip 2: restore the problematic screen and try the following: code snippet: # cat/bin/cat note! Terminal is just like spam. All input content is messy. So what should we do? Enter reset. However, the input reset is too close to the input reboot or shutdown. It's so chilling-especially on production machines. Don't worry, the machine will not restart during this operation. Continue: Here is the code snippet: # reset now the screen is back to normal. This is much better than logging in again after the window is closed, especially when you have to go through five machines and SSH to reach this machine. Tip 3: "Why can't I compile supercode. c on the new machines you deploy," says David, a senior maintenance user from the product project ". You will ask him: "What machine are you running ?" David replied: "Posh ". (This virtual enough company named its five production servers in the way Spice Girls was used ). Now you can show your skills. another machine is operated by David: The following is the code snippet: # su-david to posh: The following is the code snippet: # After the ssh posh arrives, run the following code: # screen-S foo and then call David: "David, run the command # screen-x foo on the terminal ". This allows you and David to link sessions in Linux shell. You can enter, but you can see what the other party is doing. This avoids other layers, and both parties have the same control. The advantage of doing so is that David can observe your fault diagnosis skills and understand how to solve the problem accurately. Finally, we can see the problem: David's compilation script hardcoded an old directory not on this new server. Load it and compile it again to solve the problem, and then David continues to work. You can continue your previous entertainment activities. Note that both parties must log on to the same user. The screen command can also implement multiple windows and split screens. Read the manual page for more information. I have the last tip for screen sessions. To separate and enable it, enter Ctrl-a d (that is, press Ctrl and click. Then press D ). Then, you can re-splice the screen-x foo command. Linux management efficiency, as a system administrator, will certainly be greatly improved after using these skills.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.