Command Line – dstat
Wednesday, August 3rd, 2011From command line:
$ dstat -f
This will show a great report in color for your system in real time.
For more documentation:
http://dag.wieers.com/home-made/dstat/dstat.1.html
From command line:
$ dstat -f
This will show a great report in color for your system in real time.
For more documentation:
http://dag.wieers.com/home-made/dstat/dstat.1.html
sar – Collect, report, or save system activity information.
From command line:
$ sar -b
This command shows the amount of traffic and you can check for spikes in traffic
If you use MAMP, and want to use terminal, you can NOT by default just type in terminal:
$ mysql ( enter )
You have to create a symlink for it to work:
sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/bin/mysql
sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/bin/mysqldump
These instructions are for:
Computer/OS: Mac 10.6.8
$ cd ~ ( hit enter )
You need to change permissions on a few folders ( maybe create them ) to allow write access:
If the folders do not exist, from command line you create them:
$ mkdir /usr/local $ mkdir /tmp/pear $ mkdir /usr/bin/pear
Now via command line change the permissions:
$ sudo chmod -R 777 /usr/local/ $ sudo chmod -R 777 /tmp/pear $ sudo chmod -R 777 /usr/lib/php $ sudo chmod -R 777 /usr/bin/pear
(The instructions came straight from http://pear.php.net/manual/en/installation.getting.php)
Now using terminal run the following:
$ wget http://pear.php.net/go-pear.phar $ sudo php -d detect_unicode=0 go-pear.phar
make sure you change the Installation Base: ( should be option 1 ) to /usr/bin/pear
As well as #5 the PHP code directory!
Change #1 and #5 to:
1. Installation base ($prefix) : /usr/bin/pear 5. PHP code direcotry($php_dir) : /usr/lib/php ( *** NOTE the other numbers/options can be left alone with whatever is set during installation *** )
Symbolic link to use “pear” from command line:
$ sudo ln /usr/bin/pear/bin/pear /usr/local/bin
PHING:
From the command line:
$ pear channel-discover pear.phing.info
Now you can install phing
$ pear install phing/phing
That should be it!