- unix cookbook
Assume, you made a mysqldump which consists all databases (with –all-database option), how to restore from that mysqldump the necessary database?
Solution is really simple!
For example, I’d like to know how long the processes have been running, for that purpose you can use the STIME variable:
Some of useful columns:
PPID — pid of parent process;
%CPU — cpu utilization in percent
%MEM — part of RAM(real memory) which consumed by the process
VSZ — Virtual size of process (kilobytes)
RSS — amount of 1K pages
STIME — the process time start
S or STAT — status of process
PRI — priority
NI — nice
TIME — how much time of cpu does the process take
CMD или COMMAND — command
-f – do not sort of list files
There are two types of mysql log – slow log and general log, let’s try to analyze them:
Get the mysqlsla utility:
Enable the general log:
To show where the general log is located:
The slow log
You have such unusual big traffic, where does it come from?
Also, you can use the netflow to have a history.
Checking the softflowd:
The /var/netflow/ is directory where the Netflow will save the logfiles.
How to see