/    Sign up×
Community /Pin to ProfileBookmark

How can I make a script to show what my server’s status is?

Operating System Linux
Kernel Version 2.4.25
Apache Version 1.3.31 (Unix)
PERL Version 5.8.1
Path to PERL /usr/bin/perl
Sendmail Path /usr/sbin/sendmail
PHP Version 4.3.7
MySQL Version 4.0.20-standard

Luke ?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@crh3675Jul 20.2004 — It depends on your distribution. Are you looking for modules installed? For Linux (RedHat) try:
[code=php]
exec("rpm -qa",$results,$return);

if (is_array($results)){
print "<pre>";
foreach($results as $line){
print $line."n";
}

print "</pre>";
}
[/code]
Copy linkTweet thisAlerts:
@lukedysonauthorJul 20.2004 — [i]Originally posted by crh3675 [/i]

[B]It depends on your distribution. Are you looking for modules installed? For Linux (RedHat) try:

[code=php]
exec("rpm -qa",$results,$return);

if (is_array($results)){
print "<pre>";
foreach($results as $line){
print $line."n";
}

print "</pre>";
}
[/code]
[/B][/QUOTE]



Mmmh more what I was llooking for is if you click server status in your cpanel and you have the red and green lights. Something like that ?
×

Success!

Help @lukedyson spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.10,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...