Showing More On Your Terminal
January 13, 2006 | 4 Comments
I have a monitor hooked to a FreedBSD system in my office that used to just show a login prompt all day long. Occassionally I’d sit at this machine and use the console, so the monitor was useful, but 99 out of 100 times I’d just SSH to the machine.
I decided to put this monitor to better use by continually outputting some log data to this screen. Specifically I’m outputting LDI synchronization events, which are XML. Initially I was pretty satisfied with this, except for one littel annoyance. XML is bulky, so I could only see one event on the screen at a time. I found that using scroll lock I could scroll back and see old events, but what I really wanted was either a smaller font or more lines.
Enter vidcontrol.
vidcontrol -i mode will show all the modes your display supports, but more importantly, vidcontrol 80x60 will change your terminal from the standard 80×25. In short, you’ll get more than double the number of lines.
More importantly, I won’t have to wade through the man pages next time I forget this command…
Thanks to Erich for the help on solving this one. He found some great docs on vidcontrol and vidfont, whihc I have since lost… However, here is the manpage on vidcontrol.
Tags: bsd, freebsd, ldi, linux, log, logging, monitor, monitoring, terminal, unix, vidcontrol, xml
Installing mytop
July 15, 2005 | 3 Comments
Anyone who’s done much MySQL administration probably knows about mytop. mytop is basically a top clone for MySQL. Hugely useful if you want info about what your database is up to, but don’t necessarily have pr want MySQL Administrator installed.
I decided to install this on my FreeBSD box, though I’m sure the instructions would be similar on OSX, Solaris, or any other unix flavor. Sometimes the installation can be cumbersome and everytime I do it I find myself fumbling around trying to remember what I did last time. Unfortunately my systems administration skills aren’t always as solid as I like. So here goes.
1) Get mytop
2) unpack it in some directory (tar xvf mytop-1.4.tar.gz)
3) add in the necessary perl modules (assuming you don’t already have them)
perl -MCPAN -e shell
then at the cpan prompt:
install DBI
install DBD::mysql (this one may fail if your root password for localhost is set. in this case do `force install DBD::mysql`)
install Term::ReadKey
install Term::ANSIColor
install Time::HiRes
4) In the directory where you extracted mytop execute:
perl Makefile.PL
make
make test
make install
5) You can then execute it like:
./mytop -u<user> -prompt -h<hostname>
6) For additional options see: perldoc mytop. Also try hitting ‘?’ when running mytop for runtime options.
Tags: cpan, database, database administration, freebsd, install instructions, mysql, osx, perl, perl cpan, solaris, sql, systems administration, unix
