Category Archives: sysadmin

Recently I help maintain some server, sometime I tend to move around. So I decide to make my phone to be useful.

Android actually have a couple of app that is useful to remotely access a machine. Some of them is free.For connecting to SSH, I found that connectbot works extremely well. It only does ssh and telnet, and thats about it. It is pretty straight forward to use. For accessing windows server, I use 2x client. Which again another another straight forward RDP client. Both connectbox and 2x client is free, and that is awesome.

The only issue on using android phone to access a server remotely is. I have a desire hd. While the screen is pretty large for a phone, typing command via ssh or, navigate around a windows server via RDP can be still a pain. It is still smaller that most desktop screen. And I don’t have a full size keyboard on the phone. Which is another pain especially I access linux server most of the time.

So it can be a pain to use at time. But for quick fix or checking on server. This work pretty well.

By default, the apache webroot, in ubuntu, or most distro. Is in /var/www. Which is not really a big deal, except, it’s a pain to finish writing a php script, then as root, or sudo to cp to /var/www.If it’s just a server, it’s perfectly fine, for a development machine, it’s a pain.

On the other hand. There is a userdir, module in apache. What it does basically, is it enable you to put your file in your home directory, then apache will serve the file there. By default, apache will search in /home/youraccount/public_html, or /home/useraccount/www or /usr/www. To access the file, you just need to call by http://yourserveraddress/~youraccount, with a browser.

To make it easy for me to write stuff into, i just use the form in my home directory. The implication is that, you can redirect your ide to use the directory as your work space.

To do it on ubuntu, inside, /etc/apache2 have a mods-available directory, another is mods-enabled directory. The former is the modules available, the latter is just a symbolic links, to the modules in mods-available.

Yesterdays post, revolve around blocking sites. One of the reason, someone up above, insist that filesharing sites are a source of virus, worms and their friends. So they throttle the network, until I fix it, by blocking it.

Another reason, is we are using a thin pipe, and we are using quite a lot of bandwidth. Which I think we are student, there is not much we can do. Either way, I have not much of a choice, but to track it.

Webmin have a utilities to gather bandwidth usage statistics, which have one problem, take s a lot of cpu cycle, and slow down a server and I have to kill it. Until I figure out how to reconfigure it.

MRTG can do that too. except, to check out each host, you need to have snmp agents install on them. Which I can’t because it is a dorm, and the computer is private property. So here, mrtg is monitor the server only. Life is so simple, when this is a work space.

On the other hand, linux have a few utilities for this as well. The one I use, is iftop. Best describe as top for network. It is in repository for most distro. It can be used to check bandwidth usage of each host.

To call it, just type

iftop -i ethx

you should get all the data from that interface. In a ncurse interface.

But the data don’t stay, when you restart the program it will start again. Nevertheless, still useful. For someone who can’t use snmp for the task.

One day I play around on my laptop, which I found the acct utilities, which I wonder when I install. Anyway, later I found out what it is. Actually it is a unix system accounting. Which contain a few utilities, such as:– sa– ac– lastcomm

So play around I did. So I start with sa. Which I get a set of statistics of io, memory and cpu usage.

So I was browsing around my laptop, which by incident found, acct. Which is a set of unix system accounting tools. Which from documents stored on my laptop, have:– accton: which use to turn on/off system accounting– ac: to show user connect time– sa: summarize system accounting info.– lastcomm: which printout previously executed command.:ac, is to print out user connect info. Which if executed directly just print out: