Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Command to see server status on a Ubuntu box

Posted on 2013-01-15
6
Medium Priority
?
446 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 600 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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

596 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