uptime
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| uptime [2015/11/12 12:48] – luke7858 | uptime [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ==== Process Uptime ==== | ||
| + | Find the process ID of the master (parent process), then: | ||
| + | <sxh bash> | ||
| + | ls -ld /proc/3380 | ||
| + | </ | ||
| + | Output looks like: | ||
| + | <sxh bash> | ||
| + | dr-xr-xr-x 8 root root 0 Nov 12 23:05 /proc/3380 | ||
| + | </ | ||
| + | or | ||
| + | <sxh bash> | ||
| + | ps -eo user, | ||
| + | </ | ||
| + | <sxh bash> | ||
| + | ps -eo user, | ||
| + | </ | ||
| + | Show JUST the master process: | ||
| + | < | ||
| + | ps -eo user, | ||
| + | </ | ||
| + | |||
| + | Output is simlar: | ||
| + | <sxh bash> | ||
| + | 3380 nginx: master process /usr/ 1-02:50:02 | ||
| + | 8543 nginx: worker process | ||
| + | 8544 nginx: worker process | ||
| + | 8545 nginx: worker process | ||
| + | 8546 nginx: worker process | ||
| + | 8547 nginx: worker process | ||
| + | 8548 nginx: worker process | ||
| + | 8549 nginx: worker process | ||
| + | 8550 nginx: worker process | ||
| + | </ | ||
| + | |||
| + | The bit we are interested in is the master process: | ||
| + | <sxh bash> | ||
| + | 3380 nginx: master process /usr/ 1-02:50:02 | ||
| + | </ | ||
| + | This represents 1 days, 2 hours, 50 mins and 2 seconds | ||
| + | \\ | ||
| + | \\ | ||
| + | ------------------------ | ||
| ==== Server uptime ==== | ==== Server uptime ==== | ||
| <sxh bash> | <sxh bash> | ||
| Line 8: | Line 50: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| + | ------------------------ | ||
| ==== Apache uptime ==== | ==== Apache uptime ==== | ||
| \\ | \\ | ||
| Line 31: | Line 74: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| + | ------------------------ | ||
| ==== mysql uptime ==== | ==== mysql uptime ==== | ||
| \\ | \\ | ||
| You can use any of the following commands | You can use any of the following commands | ||
| <sxh bash> | <sxh bash> | ||
| - | SHOW GLOBAL STATUS LIKE ' | + | mysqladmin |
| </ | </ | ||
| or | or | ||
| <sxh bash> | <sxh bash> | ||
| - | mysqladmin | + | SHOW GLOBAL STATUS LIKE ' |
| </ | </ | ||
| + | |||
| or | or | ||
| <sxh bash> | <sxh bash> | ||
| mysql -e 'SHOW GLOBAL STATUS LIKE " | mysql -e 'SHOW GLOBAL STATUS LIKE " | ||
| </ | </ | ||
uptime.1447332480.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
