uptime
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| uptime [2015/11/12 12:43] – created luke7858 | uptime [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | **__Server uptime__** | + | ==== Process Uptime ==== |
| + | Find the process ID of the master (parent process), then: | ||
| + | <sxh bash> | ||
| + | ls -ld / | ||
| + | </ | ||
| + | Output looks like: | ||
| + | <sxh bash> | ||
| + | dr-xr-xr-x 8 root root 0 Nov 12 23:05 / | ||
| + | </ | ||
| + | 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: | ||
| + | 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: | ||
| + | </ | ||
| + | This represents 1 days, 2 hours, 50 mins and 2 seconds | ||
| + | \\ | ||
| + | \\ | ||
| + | ------------------------ | ||
| + | ==== Server uptime ==== | ||
| <sxh bash> | <sxh bash> | ||
| w | w | ||
| Line 8: | Line 50: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| - | **__Apache uptime__** | + | ------------------------ |
| + | ==== Apache uptime ==== | ||
| \\ | \\ | ||
| CentOS | CentOS | ||
| 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> | ||
| + | mysqladmin | ||
| + | </ | ||
| + | or | ||
| <sxh bash> | <sxh bash> | ||
| SHOW GLOBAL STATUS LIKE ' | SHOW GLOBAL STATUS LIKE ' | ||
| </ | </ | ||
| + | |||
| or | or | ||
| <sxh bash> | <sxh bash> | ||
| - | mysqladmin | + | mysql -e 'SHOW GLOBAL STATUS LIKE " |
| </ | </ | ||
uptime.1447332236.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
