Archive
Posts from 2009
Configuring the Solaris FTP server to log extended data
I periodically use the stock Solaris FTP server on some of my servers, especially when I need to move tons of data around. Enabling the ftp service in Solaris is a snap: The default ftp configuration leaves a lot to be desired, especially when you consider that nothing is logged. To configure the FTP daemon to log logins, transferred files and the commands sent to the server, you can enter the svccfg shell and add some additional options to the in.ftpd command line: The "-a" option will enable the use of the ftpaccess file, the "-l" option will log each FTP session, the "-L" option will log all commands sent to the server, the "-X" option will cause all file acesses to be logged to syslog, and the "-w" option will record the logins to the wtmpx file. Since most of this information is logged using the daemon facility and info log level, you will need to add a daemon.info entry to /etc/syslog.conf if you want the data to be logged to a file (or to a remote log server)…
$ read more →Using Net-SNMP to monitor processes and execute Perl scripts by hitting a MIB
One really cool feature about net-snmp is that it can monitor processes on a system. If snmpd notices that a process is no longer running, you can specify a script to be executed which can correct the problem. Lets take a look at some examples found here At least one web server process must be running at all times: proc httpd procfix httpd /etc/rc.d/init.d/httpd restart There should never be more than 10 mail processes running: proc sendmail 10 procfix sendmail /etc/rc.d/init.d/sendmail stop There should be a single network management agent running ("There can be only one"): proc snmpd 1 1 This can be an interesting use of Puppet, Chef, or CFengine, which are configuration management engines. Depending upon the type of host (webserver, mail server, etc.) you could set up and establish different types of snmpd.conf files for that environment…
$ read more →Keeping up to date with opensolaris developments
If you are like me, you like to keep up with the latest Solaris happenings. For the latest putbacks into opensolaris, you can check out the genunix putback page: Genunix putback log To keep up with new ARC case submissions, you can keep an eye on the PSARC page: PSARC page If you would prefer to get e-mail notifications for putbacks and new PSARC cases, you can sign up on the opensolaris mailing list page.
$ read more →Greping through binary data with zgrep and gzcat
I periodically need to look for a given string in one or more compressed log files. Taking the time (and resources) to decompress each file on the file system takes time, especially when I don't plan to leave the file uncompressed. When these situations arise, I turn to my good friends gzcat and zgrep. The zgrep utility allows you to look for a pattern in one or more compressed files…
$ read more →Using Solaris source code + DTrace
Brian Leonard wrote an excellent blog postabout how to use DTrace, how to show details about specific probes, and then using the source code in conjunction with his findings to understand exactly what was happening within that probe. if you're starting to deep dive into DTrace, this is an excellent article for learning these crucial steps!
$ read more →