Tips for managing your Linux server

Here’s a few tips for managing your Linux server. Each is designed to help you in one way or another to diagnose issues or simply perform routine tasks.

Check current memory usage

If you need to determine the amount of memory that your server is currently using, use the command free -m. What you’ll see are numbers for total, used, free, shared, buffers and cached.

Let’s say your total shows 3995 megabytes (RAM), used shows 2825, free shows 1170 and cached shows 932. Those 932 megabytes stored in cache will remain there UNLESS the operating system requires that space.

This is where a number of folks get confused as they interpret the result as only 1170 available, when in reality, it’s 1170+932 or 2102. That is the real number of megabytes available to your server, for example when you initiate a new process, or run an application that requires additional memory.

monitoringMonitoring I/O usage

Let’s say you need to diagnose I/O related issues to determine status related to swap utilization, system activity, I/O wait and memory. Try using vmstat.

This is similar to the free -m command, but the column to look for here is wa, which shows the amount of time that the processor waits for I/O actions to complete.

When should you opt to initiate measures to address IO usage based on results here? It’s when that number very often reads much higher than 0. Intermittent issues are a little harder to diagnose as you’ll need to run this while the issue is ongoing.

UploadUploading files to a remote server

Try using scp to transfer files securely to your server. On your local computer, this is an example of what that command sequence would look like:

scp ecommerce-info.tar.username@hostname.forexample.com:/home/username/backups

As you can see, scp needs to know the path of the file on your local file system that you want to be transferred.

If you need to copy files the other direction, then simply reverse the order of the two paths.

Searching package databases

Every now and then, a package name is not exactly intuitive, so one way to overcome this could be to use a yum search. For CentOS, simply use yum search [package name].

Sometimes the name of a package isn’t intuitive, based on the name of the software. As a result, most package management tools make provide an option to search the package database. These search tools may be helpful if you’re looking for a specific piece of software but don’t know what it’s called.

You can also discover additional in-depth information concerning the searched package, specifically its origins, dependencies and purpose – by using the commend yum info [package-name].

Using grep to search for a string in files

Perhaps you need to search for a stream of text, for example, the output of a command or some type of pattern. The grep tool allows you to search a stream of text, such as a file or the output of a command, for a term or regex pattern.

It also features addition options like -n which outputs the line number, or -H which prints the file name for each match.

BROUGHT TO YOU BY HOSTNETINDIA

We’ve been in the web hosting industry for ten years, helping hundreds of clients succeed in what they do best and that’s running their business. We specialize in Virtual Private Servers (VPS) and dedicated servers, with data centers in Los Angeles and Singapore. In fact, we’re running a promotion on our Los Angeles dedicated servers right now.

VPS Services: Lightning Fast SSD Virtual Servers

Our Virtual Private Servers all feature high performance Xeon processors and SSD storage in a RAID10 configuration to optimize your server’s performance, which dramatically enhances visitor experiences on your site.

That speed is backed by unparalleled 24/7 support, featuring both outstanding response AND resolution times to maximize your uptime.

Now is the time to join the HOSTNETINDIA virtual private server revolution. Starting at just 999/Month AND we’re still offering Double Bandwidth and RAM on all of VPS packages (limited time offer).

Dedicated Servers: Backed by a 99.9% SLA network uptime guarantee

We only use enterprise-class hardware in our dedicated servers a

Throw in IPMI for remote management, support for public and private networks, free operating system (OS) re-installs, and SATA, SAS & SSD storage.

Thank you
Gopal Shekhawat
email id: gopal.singh@thepinnaclegroup.in
contact : 9521266952

Our Score
Our Reader Score
[Total: 0 Average: 0]

Leave a Reply