|
-
October 15th, 2005, 08:14 AM
#2
It would really depend on what you are using as a backend for the website which will be displaying this data.
If you are using a basic html page, I would recommend running a cron job or something similar which would take that pipe delimited data and put it all into text files, which you can include in a table format in the html code. This could be done with something like:
Code:
for temp in 2 4 6 8 10; do
let rack = temp-1
cat /device/temp | awk -F| '{ print $\$temp }' > rack$rack
done
Which will output the temperature of rack 1 into a file called rack1, and so on for every rack, by separating each field in the output. I think awk would be the best way to do this. I am not quite sure if I have used the correct escape sequences though. These files can then be included in the html, and with a cron job, can be updated every minute or so.
If you are using php, you can likely find a way to execute that script as part of the page code, and the temperatures for each server will then be updated every time you load the page. I know next to nothing about php however, but I do know that such a technique should be possible.
Sorry I didn't see this earlier, Spyrus. Hope I helped.
Government is like fire - a handy servant, but a dangerous master - George Washington
Government is not reason, it is not eloquence - it is force. - George Washington.
Join the UnError community!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|