I need to know the memory/CPU usage history from command line. My server is Debian (text mode only). Is it possible?
You can run the top command in batch mode by using the -b option, then dump that to a file.
On start up of your server, open a terminal, run the following commmand.
top -b > ~/cpu.txt
The sysstat collection of tools contains sar which is able to save system activity information: http://pagesperso-orange.fr/sebastien.godard/documentation.html