Solved

Command to see server status on a Ubuntu box

Posted on 2013-01-15
6
443 Views
Last Modified: 2013-01-16
Hi, I have the following servers running on my Ubuntu linux box:

Apache
Mysql
Asterisk

What command do I use to see the status of the servers running on my machine, I would like to know if the server is running or stopped. I will use this output to display the status of these servers to a web page.

Thanks for the help.

A
0
Comment
Question by:aej1973
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 38785022
ps ax|egrep '(apache|httpd|mysqld|asterisk)'
# or
ps -ef|egrep '(apache|httpd|mysqld|asterisk)'
0
 
LVL 62

Accepted Solution

by:
gheist earned 150 total points
ID: 38785239
/etc/init.d/service "status"
0
 

Author Comment

by:aej1973
ID: 38785274
gheist, I do not have a file/directory service in init.d. Can you please clarify, thank you.
0
Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

 

Author Comment

by:aej1973
ID: 38785285
Thank you for the suggestion, I was able to run the following command to get what I was looking for;

service apache2 status
service mysql status

Thank you.

A
0
 
LVL 62

Expert Comment

by:gheist
ID: 38786020
Most likely you want snmp and something like nagios in long run...
0
 
LVL 62

Expert Comment

by:gheist
ID: 38786024
P.S not mentioning a version of ubundu yields not very accurate commands
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Systems talking to each other 5 149
Centos 6.4 ModSecurity: Output filter: Content-Length Error 2 128
WebSite Direction 1 79
How to swap or extend CentOS partition 11 51
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question