system – Internetblog.org.uk https://www.internetblog.org.uk Web hosting, Domain names, Dedicated servers Fri, 29 Jan 2016 11:05:52 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.5 https://www.internetblog.org.uk/files/2016/01/cropped-favico-32x32.png system – Internetblog.org.uk https://www.internetblog.org.uk 32 32 Extra Large Log Files https://www.internetblog.org.uk/post/1530/extra-large-log-files/ Wed, 14 Jul 2010 19:13:00 +0000 http://www.internetblog.org.uk/post/1530/extra-large-log-files/ Linux syslog file
Question: One of my Linux system log files has suddenly become very large (several hundred megabytes). What should I do?

Answer: The first thing to find out is what exactly is happening in the log files. To see the latest log activity for your web server error log, for example, you would run:

tail -f /var/log/httpd/error.log

If the file is expanding, you should see errors popping up. When you are finished looking at it, press CTRL-C.

The next step is to fix whatever error you are receiving. If it is enough to fill up several megabytes or even a gigabyte of log space, it is a recurring error that should be fixed. For a web server, repeated failed connections could be some type of denial of service (DoS) attack. For a mail server, numerous open connections could mean that someone is using your server to send spam. The key is to find out exactly what the root cause is and then fix it. If you want to clear the log file, run:

> /var/log/httpd/error.og

Your logs will be back to normal size once your server is running normally again.

]]>
How to Schedule a Reboot on a Windows Server https://www.internetblog.org.uk/post/1430/how-to-schedule-a-reboot-on-a-windows-server/ Tue, 15 Jun 2010 18:13:33 +0000 http://www.internetblog.org.uk/post/1430/how-to-schedule-a-reboot-on-a-windows-server/ Windows server 2008 core installation
In a previous post, I explained how to use the “at” command to schedule a reboot on a Linux server. On a Windows server, you can accomplish the same thing. Scheduling a reboot is helpful for those rare occasions when you make changes to your server that require a reboot. A major system security update is a perfect example.

In those instances, it is not wise to reboot your server in the middle of the day, at the height of website traffic. By scheduling your reboot, you can minimize the number of website visitors affected by any downtime. Also, if something goes wrong, any extended downtime will be during off hours.

To schedule a reboot, enter the Windows command prompt and run the following command:

c:> at 4:00am c:\admutils\psshutdown.exe -r -f -c -t 10

In this example, the server will reboot at 4:00AM. As with any server, make sure that your system time is correct. Otherwise, you might end up performing the reboot at an inopportune time.

Source: nixCraft
Photo Source: Flickr

]]>
Rolling Your Own Kernel: Pros and Cons https://www.internetblog.org.uk/post/1429/rolling-your-own-kernel-pros-and-cons/ Tue, 15 Jun 2010 17:58:19 +0000 http://www.internetblog.org.uk/post/1429/rolling-your-own-kernel-pros-and-cons/ Tux Linux mascotGenerally speaking, it is a sound idea to keep the default packages, kernel, and drives installed on your server when you first purchased it or when you first installed your Linux-based operating system. Recompiling a kernel is usually something taken up by adventurers and computer science students. Despite that general trend, there are some rare cases when compiling the Linux kernel from source might be beneficial or necessary.

Pros:
1. Kernels compiled for specific hardware are generally faster.
2. You can exclude modules and other components you do not need.
3. If you have specific requirements, you can add them or even change parts of the source code completely.

Cons:
1. You become responsible for updates, security patches, etc.
2. Something could go terribly wrong if you do not compile a good kernel.
3. It takes a long time and requires a good deal of technological expertise.

It is truly up to the system administrator to decide whether a custom kernel is necessary on a dedicated server. Choose wisely.

Image Source: Wikimedia Commons

]]>
Disable unused services on your server https://www.internetblog.org.uk/post/888/disable-unused-services-on-your-server/ Fri, 15 Jan 2010 13:40:07 +0000 http://www.internetblog.org.uk/post/887/disable-unused-services-on-your-server/ CentOS Services setup
Unused services may seem like a non-issue, but they cause your server to take longer at boot, and they eat up RAM that could be used for critical services. This is a cross-platform issue, so Linux, Windows, BSD, and Solaris servers could all potentially have unused services running in the memory.

For example, Linux distributions and Mac OS X often come with CUPS enabled, but if you are using your box as a web server, CUPS, a printing server, is not something you need. Other unused services might include X.org (a graphical window server), bluetooth, hplip (another printing server), nfs (network file system), and many others. Find out what services you are not using and will not need and disable them.

To disable services from starting at boot in Redhat Enterprise Linux, CentOS, and Fedora, become root:

su

and type from the command line:

setup

Scroll down to “System Services” and then remove the star from any of the services you do not need. Tab to “OK”, press Enter, and then tab to Quit and press Enter.

]]>
Viewing active processes in Linux https://www.internetblog.org.uk/post/656/viewing-active-processes-in-linux/ Mon, 09 Nov 2009 18:03:01 +0000 http://www.internetblog.org.uk/post/656/viewing-active-processes-in-linux/ ps command in Debian
Question: How do I find out what programs are running on my server?

Answer: Linux and most Unix-like operating systems have a convenient command that allows you to view running processes in a variety of list styles. The command is called “ps”. To quickly see every process running on your system, type:

ps aux

This will show all processes, not just ones owned by the local user. It will also display the usernames of the users running the processes.

If you want to only list process information for programs with a certain name, type:

ps aux | grep name

…replacing “name” with the program name you want to find. To learn more about the many features available with “ps”, type “man ps” from the command line.

Photo Source: Flickr

]]>