|[ Main ] [ Home ] [ Work ] [ Code ] [ Rants ] [ Readings ] [ Links ]|
What is it?The osptools are a collection of short shell scripts that allow you to do some pretty basic stuff that nevertheless may be quite useful during your everyday administration and usage of a Linux box: kill Netscape in an orderly fashion whenever it hangs (quite often, if I may add), make a backup copy of its most important files (bookmarks, etc.), clean up the browser cache, clean up the directories where RPM packages get built by default in a Red Hat system, etc. The whole suite of scripts was created to be used by the Open Spaces Technologies group, although it's fully GPLd and can therefore be used freely.
Taken directly from the README file:
The tools included in this package are: hinv: Perl script written by Larry McVoy to emulate the behavior of the IRIX command by the same name. mkclean: cleans the source directory where RPM packages are built in Red Hat systems. mkmonitor: automatically monitors important system services at given intervals of time, and restarts them if they exited. mknetscape: script that allows to kill all Netscape processes in case the application is hanging, clean the cache or make a backup of its important configuration files such as bookmarks, etc. mkmozilla: similar to mknetscape, this script allows you to perform the same actions (except for the backup operations) on the Mozilla browser. mkreport: script to create a report that gets sent to root via email containing basic information about the current status of the system. mksecure: script that takes some extremely simple steps to minimally secure the system by making certain files or filesystems read-only. Keep in mind that this does NOT in ANY WAY provide much security in case the system is broken into by a knowledgeable cracker, but it may help if the system suffers an attack from script kiddies. sysinfo: script that collects some information about the system (hostname, overall configuration, memory usage, network info...) in order to provide some help in troubleshooting potential problems. The information gets emailed.
RequirementsThe list of requirements is pretty much limited to an installation of Red Hat Linux. The original version of the scripts was specifically written for version 6.2 of the distribution, but it also works fine on later releases such as 7.3
How to install and configureEasy, as with any other RPM package. Simply download it to your hard drive and run the following command as root:
Future improvementsWell, who knows! Not sure what else I'll be adding, although the following are some perfect candidates to improve the current scripts:
ChangelogDirectly taken from the Changelog file included with the package:
v1.1 (13 July 2002) Fixed bug in 'mknetscape' that still caused it to fail when killing all the Netscape processes (I finally decided to forget about using 'cut' and used 'awk' instead, which is far more powerful, in the line to kill the processes). Also, added the hostname to the subject of the reports emailed by 'mkreport' to make it easier to spot them in the Inbox folder. Finally, added a new script ('mkmozilla') to use with the Mozilla browser. v1.0 (7 January 2002) Modified the disk usage command in the 'mkreport' script to work correctly under the 2.4 kernel which also displays the usbdevfs. Also, added an if test to the section that uses nmap in the same script to account for those cases where the utility is not installed. Added an "*" entry to the case structure in the 'sysinfo' script that deals with arguments passed to the utility (oops!). Added some lines to the 'sysinfo' script to account for those cases (like Red Hat 7.2) where there is no inetd.conf and the modules configuration file has a different name. Fixed bug in 'mknetscape' so that it reliably kills the processes now no matter what (it relies on the ~/.netscape/lock file now).