[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] [RAQ3] Temperatur Sensor
- Subject: Re: [cobalt-users] [RAQ3] Temperatur Sensor
- From: "Ing. Ernesto Pérez Estévez" <ernesto@xxxxxxxxxxx>
- Date: Tue Mar 27 06:42:16 2001
- Organization: Agilweb - Cuenca - Ecuador
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
well well.. I've this script. Hope you'll enjoy it. BTW, if any of you
want to make any improvement to the script, feel free.
It's named: temp.cgi and located under the cgi-bin directory of the web
server. And also remember to chmod +x temp.cgi and to chown
<thewebadmin.thewebgroup> otherwise it wont execute.
I don't think it's necesary further help to install it. It's very
simple. But if any of you needs some help, contact me privately and I'll
try to install it for you.
#---------------------- temp.cgi ------------
#!/usr/bin/perl -w
# Made by: Ernesto Perez Estevez
# email for problems, concerns and support to:
# ernesto@xxxxxxxxxxx
use CGI;
open (HOSTNAME,"</etc/HOSTNAME") || die "Error Opening File. $!\n";
$t=<HOSTNAME>;
print "Content-type: text/html\n\n";
print "<meta http-equiv=\"refresh\" content=\"45\">\n";
print "<head><TITLE>$t</title>";
print "</head><BODY>\n";
system ("cat /proc/cpuinfo|grep temp > temp");
open (EPE,"<temp") || die "Error Opening File. $!\n";
$_=$t . " - " . <EPE>;
print "$_";
close (EPE);
close (HOSTNAME);
print "</body>";
#---end
Curtis Ross wrote:
> > -----Original Message-----
> > From: ernesto@xxxxxxxxxxx@CPR
> [mailto:IMCEANOTES-ernesto+40agilweb+2Enet+40CPR@xxxxxx]
> > Sent: Tuesday, March 27, 2001 12:37 PM
> > To: cobalt-users@xxxxxxxxxxxxxxx
> > Subject: Re: [cobalt-users] [RAQ3] Temperatur Sensor
> >
> >
> > as root type the following:
> >
> > [root@sec /root]# cat /proc/cpuinfo|grep temp
> >
> > You'll get the following:
> > temperature : 43.5
> >
> > There should be other ways. I use this one.
> >
> > Regards
> >
>
> Anyway a person could pipe that info to a html page for multiple
> servers? Might be useful for a heads up on fan failures.
> Curtis
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users