In Part 1 of this article, we discussed some basics of the ext* filesystems in Linux. In this section we’ll have some good old filesystem fun. The most commonly used tools for working with Linux filesystems are mke2fs (create ext2/ext3 filesystem), tune2fs (adjust filesystem parameters) and e2fsck (check and repair filesystem.) ADD JOURNAL TO EXT2 […]
E is for Ext3fs Part 2
F is for Find
One-liners illustrating the use of the find command abound on the world wide web. The command’s operation is straight forward, but it has so many options that the man page always makes for fascinating reading. The find command is your friend whenever you need to *find* files based on name, size, file type, creation/access/modification time, […]
G is for grep
Like using the word “grok” in conversation, saying “grep” out loud brands you a SuperGeek, at least in the mundane reckoning of members of the “normal” population. They don’t understand that grep is simply an odd concatenation of the phrase “grab regular expression”; and even if they did know, it would mean nothing to them. […]
H is for Head, Tail, or Split the Difference
Head, tail and split are three of the most commonly used utilities on GNU/Linux systems for the manipulation of text files. They are tiny, sharp, and all possess some handy options of which even the experienced user may be unaware. Head returns the first lines of a file or standard input. By default, it outputs […]
Using MSInfo
Do check out msinfo32.exe. Virtually everything that you would want to know about the system configuration of a Windows machine will be revealed with this command. Msinfo32.exe is located under /Program Files/Common Files/Microsoft Shared/MSInfo (at least on our system). If you wish to dump the report to a file, use: msinfo32 /report reportname.txt It takes […]
Automated Log Monitoring with LogSentry and a Central Syslog Server
Part One: Installing and Configuring LogSentry by Urbana Der Ga’had If you haven’t automated the monitoring of your system logs, you’re flying blind. By proactively identifying hardware failures, unusual patterns of user behavior, and intrusion attempts, you can often solve problems before they become painful. festering. scars that won’t heal. Oh yes! In Part One […]
Automated Log Monitoring with LogSentry and a Central Syslog Server II
Part Two: Configuring a Central Syslog Server By Urbana Der Ga’had In Part 1 of this article we installed and configured LogSentry to automate the monitoring of the system logs on our machine. That’s great if we’ve only got one or two systems, but what if we have a dozen *nix systems, or fifty, or […]
Monitoring Servers With GKrellM
GKrellM is a GPL’d multi-platform monitoring program. For a Windows port, see Bill’s Software. In this article we will get GKrellM running on 5 different systems and use client/server mode to connect via SSH, and monitor the systems from a centralized console. We are quite excited about this project because it is client/server (now), has […]
Grabbing Top Stats Remotely
One particularly useful tool for systems administration is top. One thing you may not be aware of, is that you can output the information top provides to a file. You may also not know that you can run commands like this remotely via ssh. Here is a short script that demonstrates this: #!/bin/sh /usr/bin/ssh user@domain.com […]
Using Composite To Create Status Wallpaper
We have written several articles on pulling stats from various locations and integrating them. Well, Agatha has been busy, and finally got her desktop integrated. Here is a snapshot of Agatha’s desktop using these techniques: Click for a larger image The trick to creating this desktop is to use gozer to create images from the […]
Creating Log Archives on Windows 2000
We have a process that creates a log file, and we want to archive the log files every day. The easiest way to rotate these logs is to create a batch file that copies the log file to a filename that includes the date of the file as the file name. Now, we can’t really […]
Monitoring a Bunch of Servers in Windows Performance Monitor
We recently had to monitor a farm of Windows servers with Performance Monitor. True, we could add one counter at a time from the various servers… point, click, wait, pulldown, click, ok, click…. aaarghhh. Burning hot pokers in the brain working on these boxes. Now, it turns out that you can edit the log settings […]
Ping Monitoring Over a WAN – Introduction
One problem with monitoring servers over a WAN is that the WAN is often down during the night. Now, if the WAN is down hard, that is a separate issue. But, just because a host does not respond to a ping does not mean the WAN is really down, or that the server is down. […]
Ping Monitoring Over a WAN – Main Routine
We introduced a ping monitoring program in this article. In this article, we will start documenting our script by going over the main routine: use Time::Local; use Mail::Sendmail; use Net::Ping::External qw(ping); $pmwrap=0; while (6 ne 9){ # Loop forever… I don’t mind. system(“cp new.dnsf dnsfc”); # Each pass through the servers, copy dnsf again to […]
Ping Monitoring Over a WAN – Check/Log Routines
In this article we introduced a ping monitoring perl script. We talked about the main routine in this article. Now, let’s go over the printtime() and ckserv() functions. The printtime function simply writes a timestamp to mon.txt: sub printtime{ open (PM,”>> mon.txt”); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time); $mon++; $year=$year+1900; print PM “\n”.$mon.”/”.$mday.”/”.$year.”-“.$hour.”:”.$min.”\n”; close PM; } The >> in the […]
Ping Monitoring Over a WAN – Adding Perl Mods
A couple of modules that we use in our ping monitoring script are Mail::Sendmail and Net::Ping::External. To install these, use the CPAN shell to search for the available Sendmail mods: root@srv-1 root # perl -MCPAN -e shell Warning [/etc/inputrc line 28]: Re-binding char #27 from [F_ViEndInsert] to meta for [91 49 126] => BeginningOfLine. cpan […]
Ping Monitoring Over a WAN – pf and rf routines
Pf and rf are the two final subroutines we need to discuss for our Ping Monitoring Over a WAN perl script. Both modules use the Net::Ping::External module, which we chose because it works on Windows and GNU/Linux (and because of this, probably works on most every platform that perl runs on). Here is the pf […]
Make Windows Talk to Syslog
One of our networks has just a few production Windows servers on it, and a whole bunch of Linux boxes. Being a Unix sysadmin by trade and inclination, this situation is mostly dreamy except for one thing: auditing the event logs on the Windows servers. We can’t just put our head in the sand and […]
Graphical Ps With Xps
Xps shows *nix processes as a tree. The status is indicated by color. Compile and run: u-1@srv-1 xps $ ls xps-4.2.tar.gz u-1@srv-1 xps $ tar -xzf *.gz u-1@srv-1 xps $ cd xps* u-1@srv-1 xps-4.2 $ u-1@srv-1 xps-4.2 $ ./configure checking for a BSD-compatible install… /bin/install -c checking whether build environment is sane… yes checking for […]
Using Ps-watcher to Monitor Processes
Ps-watcher can run ps periodically and match patterns based on the output of ps. You can check for memory usage, number of processes, etc. Let’s grab the program and try to compile: [root@test psw]# ls ps-watcher-1.0.tar.gz [root@test psw]# tar -xzf *.gz [root@test psw]# cd ps* [root@test ps-watcher-1.0]# ls aclocal.m4 configure install-sh mkinstalldirs README touch.pl AUTHORS […]