Administrators must follow some management skills to improve Linux management efficiency.

Source: Internet
Author: User
To improve Linux management efficiency, administrators must follow some management skills. 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 administrator's efficiency.

To improve Linux management efficiency, administrators must follow some management skills. 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 administrator's efficiency.

Tip 1: unmount the unresponsive DVD drive

Experience for new users: when you press the Eject button on the server (running the Redmond-based operating system) DVD drive, it will pop up immediately. 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:
# Mount/media/cdrom
# Cd/media/cdrom
# While [1]; do echo All your drives are belong to us !; Sleep 30; done
Now open the second terminal and try to bring up the DVD drive:
# Eject
The following message is displayed:
Umount:/media/cdrom: device is busy
Before releasing the device, let's find out who is using it.
# Fuser/media/cdrom
The process is running and the disk cannot be popped up. this is actually our error.
Now, if you are the root user, you can terminate the process at will:
# Fuser-k/media/cdrom
Now you can unmount the drive:
# Eject
Fuser is normal.

Tip 2: restore the problematic screen

Perform the following operations:
# 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 operation:
# 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: screen collaboration

David, a senior maintenance user from the product project, called and said, "Why cannot I compile supercode. c on the new machines you deploy ".
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:
# Su-david
To posh:
# Ssh posh
Run the following code:
# Screen-S foo
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.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.