Programming :: Monitor Temps And Values Fed In From A Data Acquisition Device

Feb 7, 2010

I'm thinking of a web based app that will monitor temps and values fed in from a data acquisition device but am seeking advice on what to use to produce the web page would php be powerful enough? The app will also have to have access to a shell for scripting, I know thats a security risk but it will not be in an exposed env. The web page will have a series of lcd readouts displaying the aquired data refresh rates will probably be around 5 seconds along with control buttons to turn on and off values. Storing data in a mysql database for statistical reports would be needed eventually. Ubuntu 9.10 will be the os. Is python easily integrated into apache?

View 2 Replies


ADVERTISEMENT

Networking :: Data Acquisition System For Vehicle - Access Points

Aug 21, 2010

A friend of mine is building a data acquisition system for a vehicle that will wander through city streets and roads and perhaps even off-road places. At the end of the day, back at the garage, the data must be downloaded and, if needed, upload an update of the data acquisition program. The network is wpa_supplicant, and it was chosen an USB device, because the original computer did not had any wireless interface and do not have any other possibility. The problem is that, when the vehicle comes back, very often there is no access to the on-board computer, or the connection lasts just a few minutes.

The computer must be reinitialized so the connection is back and the scripts run completely. Sometimes the connection is made, but the guys are so used to restart the computer that they do it anyhow, and then the connection does not come up, they have to restart it again.I have being thinking, as the vehicle drives all around, perhaps finding some access points along the day, if this connection trials - and failures - are messing up something. Or, the connection instability as the vehicle approaches the garage, could be driving his scripts mad?

View 2 Replies View Related

Programming :: Shell Script To Table RAW Device Values?

Mar 30, 2011

I'm working on a script to table the outputs of various commands that depend on each other. The commands are these:

Code:

[root@kybsdc2 ~]# raw -q /dev/raw/raw1
[root@kybsdc2 ~]# sginfo -a /dev/dm-5 | grep Serial
[root@kybsdc2 ~]# multipath -ll

which give these outputs:

Code:

#/dev/raw/raw1:bound to major 253, minor 5
#Serial Number 'P3e8hZWrsSeX'
#netapp (360a9800050336538685a577273536558) dm-5 NETAPP,LUN
[size=1.0G][features=1 queue_if_no_path][hwhandler=0][rw]

[code]....

Also the RAW13 device has completely wrong output due to 1 occurring more times throughout the sequence causing more information to be displayed then needed. The last point is if I could somehow remove the '' in the serial number outputs and the = sign from the device sizes. I guess I will have to either put a whole lot of logical IF or CASE statements in but somehow I need to streamline and make this code dynamic!

View 8 Replies View Related

OpenSUSE Hardware :: Monitor The Temps Of /dev/sdb And /dev/sdc In Conky (/dev/sda Is An SSD So Not Necessary?

Jun 16, 2011

I'm trying to monitor the temps of /dev/sdb and /dev/sdc in Conky (/dev/sda is an SSD so not necessary, or even possible). I have HDDtemp running as a daemon, and returning correct temps for both drives when run from konsole. Output:

Code:
linux-b98i:/home/hgm # hddtemp /dev/sdb /dev/sdc
/dev/sdb: SAMSUNG HD501LJ: 35°C

[code]....

View 2 Replies View Related

Software :: Windowed System Monitor That Include Temps

Jun 16, 2010

I'm using Ubuntu Netbook Edition on my family's 4 netbooks. Sadly (and a big mistake in my opinion?), I can't add a temp monitoring applet to my panel, but that's not really the point. I am needing a way to monitor my computer temps that includes a graph (kinda like a CPU usage monitoring graph).

I really need this ability because I have another regular laptop that overheats at times and I would like to see the history without using a script to do it via text and logging.

View 1 Replies View Related

Programming :: Getting A Script To Continuously Monitor Appended Data To A Log File?

Oct 13, 2010

Code:

if ! [ -f ${PATH}/myfile.txt ];then
echo $(date +%Y%m%d"_"%H%M%S)": Nu am gasit fisierul ${PATH}/myfile.txt"
ps -fxu pin | grep "/usr/local/coreutils/bin/tail -f ${LOG_PATH}/x.log$" | awk '{system("kill "$2)}'
cat ${LOG_PATH}/x.log | sed -n -e '/LONG/{x;1!p;g;;}' -e h > ${PATH}/myfile.txt

[code]....

I have a continuously growing log file (x.log) in which i have to look for certain lines that contain "Long". The line above each line containing the word "Long" it contains a time stamp. I want to extract each line containing the time stamp into myfile.txt and check the difference between time stamps. Whenever there is a difference i need to run another script (${CAL_PATH}/${APP_NAME}), then sleep 1, then continue searching. Lines with "Long" do not appear continuously, but in blasts. The script runs fine until the first pause encountered. Starting with the first pause, tail -f doesn't write in myfile.txt anymore. Can someone help me understand why "tail -f" it stops writing into myfile.txt? Or does someone know an alternative to "tail -f" of achieving the initial scope of the script?

View 5 Replies View Related

Ubuntu Installation :: Monitor Preferences - No Values - 11.04 New Install

Apr 28, 2011

I started with a newly built system using an ASUS P8 H67-M LE Series MB, that has Intel's Sandy Bridge

The CPU is an i5

I installed the 64 bit Ubuntu, 11.04

In the Control Center, I go to the Monitor Preferences, and all the settings are grayed out.

Monitor in On is set.

Resolution, Refresh Rate and Rotation are disabled.

If I click the Apply button, I get a pop up window with the message:

The selected configuration for displays could not be applied required virtual size does not fit available size ....

The Detect Monitors button is enabled, but clicking has no effect. No monitors are identified.

How do I get the monitor settings working?

View 2 Replies View Related

Programming :: Else & Return Values?

Oct 12, 2010

i am having two small issues with a function i have made.sorry if it is a mess, i am still learning bash.the first is calling the nonpersistssh function (second line) and assigning the return value to nonpersistdiag.the function returns 1, but nonpersistdiag seems to only contain 0. i am unsure on how to proceed.the second problem is the nested else clause on line 10. it is a syntactical error. how would i declare it correctly?

Code: function endsession(){
nonpersistdiag=$[nonpersistssh]# a function that returns an exit code
sudo /etc/init.d/ssh stop; sshdiag=$?

[code]....

View 6 Replies View Related

Programming :: Modifying Hex Values From A Script?

Nov 11, 2010

I can use hexedit to manually edit one or two hex values in a binary file, but if I want to change many of the, this is impractical. Is there any tool that will take parameters like Code: someTool filename byteNumber replacementByte ?

View 3 Replies View Related

Programming :: Extract Values From Array PHP

Jul 2, 2009

The idea is to make a website to check the availability of domains and it works but its not pretty yet. Below is what i have till so far:

## this is the API from my domain registrar.
<?php $client = new SoapClient('http://api.sync.com/?wsdl');
## I have a search box that sends the request to this page
$var = $_GET ["s"];

## remove the most common subdomains from the request.
$var=eregi_replace("www.", "", $var);
$var=eregi_replace("mail.", "", $var);
$var=eregi_replace("ftp.", "", $var);
$var=eregi_replace("pop.", "", $var);
$var=eregi_replace("smtp.", "", $var);

## remove any TLD extension from the request.
$split = explode(".", $var);
$main = $split[0];
$arraysize = sizeof($split);
for ($x=1; $x<$arraysize; $x++) {
$tld .= "." . $split[$x];
}
## login to the API
$paramLogin = array('handle' => 'randall', 'password' => 'password');

## match the domain with any possible TLD
$varcom = $paramAvailDomain = array('sld' => $main, 'tld' => 'com');
$varnet = $paramAvailDomain = array('sld' => $main, 'tld' => 'net');
$varorg = $paramAvailDomain = array('sld' => $main, 'tld' => 'org');
$varbiz = $paramAvailDomain = array('sld' => $main, 'tld' => 'biz');
$varinfo = $paramAvailDomain = array('sld' => $main, 'tld' => 'info');
$vareu = $paramAvailDomain = array('sld' => $main, 'tld' => 'eu');
$varnl = $paramAvailDomain = array('sld' => $main, 'tld' => 'nl');
$varbe = $paramAvailDomain = array('sld' => $main, 'tld' => 'be');
$varde = $paramAvailDomain = array('sld' => $main, 'tld' => 'de');
$varcouk = $paramAvailDomain = array('sld' => $main, 'tld' => 'co.uk');
$varorguk = $paramAvailDomain = array('sld' => $main, 'tld' => 'org.uk');
$varname = $paramAvailDomain = array('sld' => $main, 'tld' => 'name');
$varmobi = $paramAvailDomain = array('sld' => $main, 'tld' => 'mobi');
$varin = $paramAvailDomain = array('sld' => $main, 'tld' => 'in');
$vartv = $paramAvailDomain = array('sld' => $main, 'tld' => 'tv');
$varcn = $paramAvailDomain = array('sld' => $main, 'tld' => 'cn');
$varws = $paramAvailDomain = array('sld' => $main, 'tld' => 'ws');
$varnu = $paramAvailDomain = array('sld' => $main, 'tld' => 'nu');
$varbz = $paramAvailDomain = array('sld' => $main, 'tld' => 'bz');
$varcc = $paramAvailDomain = array('sld' => $main, 'tld' => 'cc');

## this requests the domain.COM and domain.NET
$varcom;
$varnet;
?>
<div id="content">

## below prints the result
<?php
print "<html><body><pre>";
$result1 = $client->__soapCall('Login', $paramLogin);
echo "<b>Result Login:</b>
" . print_r($result1, true);

$result15 = $client->__soapCall('AvailabilityDomain', $varcom);
$resvarcom = var_dump($result15, true);
$result15 = $client->__soapCall('AvailabilityDomain', $varnet);
$resvarnet = var_dump($result15, true);

print "</pre></html>";
?>
<?php

## the returned array looks like this

Result Login:
Array
(
[code] => 200
[message] => Login succesful
)
array(3) {
["code"]=>
string(3) "200"
["message"]=>
string(20) "Domain not available"
["result"]=>
object(stdClass)#236 (1) {
["status"]=>
string(5) "TAKEN"
}
}
bool(true)
array(3) {
["code"]=>
string(3) "200"
["message"]=>
string(16) "Domain available"
["result"]=>
object(stdClass)#232 (1) {
["status"]=>
string(4) "FREE"
}
}
bool(true)
?>
## till so far it works

What I need to do is to make this ugly looking reply in to something more readable, basically if TAKEN print occupied and if free print its yours to grab. I have been struggling with the in_array function but i'm not getting anywhere close in getting it to work.

View 2 Replies View Related

Programming :: Get Variable Values From Keyboard?

Jul 11, 2010

I have been reading the Wikibook on C Programming for quite some time and am up to the variable part. I did learn several new things, like that too many variables hog memory.

What I want to know is how to assign a variable to the keyboard (in the C/C++ family) as such that the user has to type it in.

View 2 Replies View Related

Programming :: Passing Values Through Pages?

May 23, 2010

I have the following snippet HTML code:

Quote:

<table id="profile">
<tr>...............</tr>
<tr>
<td width="40%">

[Code].....

How can pass values in args[0] and args[1] to Perl/CGI script?

View 2 Replies View Related

Programming :: PHP Array - Possible To Get More Than Two Values Per Entry?

Jun 13, 2009

I created a class which has to return an array. My problem is I need to return 3 entries per record for example:

Code:
array(
"2009-06-13", "John", "Doe";
"2009-06-13", "Paul", "Simon";
"2009-06-12", "Frank", "Herbert";
);

Can this be done? What is the syntax? Where is the documentation? If this can't be done, How would you return this to a class without using a DB?

View 3 Replies View Related

Programming :: Possible To Communicate Values Between Class?

Feb 24, 2009

I have a application in C++, and now I have two class. MyDialog is the class that main function launch. In MyDialog class there are four elements and when I click over theese elements, there is a MousePressEvent that launch other class, Touchpad class. So, in some moments, I have loaded two class. My question is, how can pass a value from Touchpad class to MyDialog class, when I close (destroy) Touchpad class. In a few words, is it possible to communicate values between class?

View 5 Replies View Related

Debian Programming :: Returning Different Values For Same Code?

Sep 11, 2014

I am developing a script to automate some database setup, but I have an issue I cannot figure out. I prompt for some input with whiptail and select a default if nothing is entered. However, if you do not enter anything, it normally returns 0, but this time it is returning an empty value.

Code: Select all  # This one does work!

  # Set the source path
  TMPPATH=$(whiptail --backtitle "Linux Build Configuration"
    --title "Source-Code Path"
    --inputbox "Default: $SRCPATH" 0 60
    3>&2 2>&1 1>&3)

[Code] ....

So what is wrong with the second code?

View 1 Replies View Related

Programming :: List Of Hex Values For Intel / AMD Instructions

Jan 24, 2010

Does anyone know what the Inet/AMD instruction 'nopl' is or does anyone know where I can find a list of hex values for the Intel/AMD instructions. nothing important is waiting on this reply.

[Code]...

View 3 Replies View Related

Programming :: Parsing And Storing Multiple Values Using 'awk'?

Jan 24, 2011

I have a variable in which the data is stored as below:

variable_test=0m0.001s 0m0.001s 0m0.001s 0m0.001s 0m0.001s 0m0.001s .....an so on.

There are lots of values in format like "3m1.057s" are stored in variable_test separated with an space between two such values. For exapmple, value is "3m1.057s" I need to save different parts of a value in three separate array variables such as the

var_hour=3
var_min=1
var_sec= 057

tell if this can be done using "awk". A "WHILE" loop might be used to separate and store theses values I guess?

View 1 Replies View Related

Programming :: C Arguments To Main - Can't Compare Values?

Jul 24, 2011

Whats wrong with this:

Code:
#include <stdio.h>
int main(int argc, char *argv[])
{
if(argv[4] == "-verbose")
{
printf("Verbose is on");

[Code]...

View 2 Replies View Related

Programming :: C Bool Return Values Conventions

Oct 30, 2010

I have a function that returns a boolean value, True of False. Is there any convention whether 0 = False or 0 = True? It should be obvious, 0=False, 1=True. However programs usually return 0 on success and reserve higher numbers for error values. I.e. if the program finishes successfully (function int main() finishes successfully ), it returns 0 - and that contradicts that 0 should be false.

And especially if I want a function to do some computations on parameters passed by reference and return success status. Should it return 1 (true) for success, or should it return 0 for success - like any Unix program does?

Is there any convention for this?

View 1 Replies View Related

Programming :: Capture Link Values With Cgi Script

Mar 23, 2010

I'm creating my personal site in HTML/CSS and Perl/CGI. I have a list of links:

Quote:
<a name="link1" href="/cgi-bin/script.cgi">value1</a>
<a name="link2" href="/cgi-bin/script.cgi">value2</a>
<a name="link3" href="/cgi-bin/script.cgi">value3</a>
<a name="link4" href="/cgi-bin/script.cgi">value4</a>
<a name="link5" href="/cgi-bin/script.cgi">value5</a>

I want capture values of "value*" in <a> tags with script.cgi.

View 8 Replies View Related

Programming :: Enum Values In The (Winodws) Registry?

May 13, 2010

Code:
DWORD type = REG_NONE;
int i = 0;

[code]....

View 14 Replies View Related

Programming :: Running Some Script To Generate Below Values?

Mar 24, 2011

We are running some script to generate below values however we don't need the first level output as it always shows cpu % as 0.0.

(We dont need following part:
NAME STATE CPU(sec) CPU(%)
XXX -----r 55567 0.0

[code]....

View 10 Replies View Related

Programming :: Not Able To Invoke Variable Values / Sort It?

May 5, 2010

I am trying to import variable values from a profile file to a perl program.
I am using the below command for doing it.

Quote:

system (". /opt/bbfb/bin/setbbfbenv $codeset");

the above command does make variable values available to the running perl program..
Can some one help me on this front..

View 1 Replies View Related

Programming :: Search The Count Values From The Dictionary?

Feb 1, 2011

I have written a code on Linux that searches a long dictionary. I have used hsearch() function but the problem is it does not work. This is my code://Search the count values from the dictionary.

Code:
#define _GNU_SOURCE
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<search.h>
#include<inttypes.h>
#include<math.h>

[Code]...

I open each DIC file, get the word from it and search the hash table and extract the key from it. The problem with the above code is that it is able to make the hash table but it returns NULL when searching. It should not return NULL in any case because all words from DIC files are there in the dictionary. I am not able to figure out why?

View 1 Replies View Related

Programming :: Sorting Specific Values From An XML File

Sep 21, 2010

I need a shell script which gathers the data from a remote XML file and then displays it according to my needs.. I need this for my job due to the fact that I need to keep track price changes of euro, usd, gold, etc. The XML file I am talking about is located at this page: here. The reason I am posting the URL is that I need to use curl to get this file and it does NOT have newlines after each tag. I thought that that would be a problem. Here is what I need from the script: 1) curl to get the page 2) make use of sed, awk, etc. to display its contents in a more structured and readable manner as shown below:

A: 64.125 (% -0.26)
B: 81.130 (% -0.32)
C: 1.4930 (% 0.00)
D: 1.9590 (% 0.36)

View 5 Replies View Related

Programming :: Insert Values Into A MySql Database?

Feb 9, 2010

I want to insert values into a MySql database. The following line works fine:1

Code:
mysql_query(connection, "INSERT INTO main (NumofShows , Title) VALUES('12', 'Home')");
but if the data to be inserted is from a string... like....
Code:
string NewTitle = "Monaco";
string NumofShows = "2";

How do i edit my sql statements so variables can be inserted into the Values ( ) , and it will be able to read the variables and then store it into the database.

View 4 Replies View Related

Programming :: Two Pointers, That Have The Same Address Point To Different Values?

Feb 17, 2011

I have the most strange problem ever in programming. I fork a process into a parent and a child. In every forked process i declare a pointer, malloc and define a different value for every pointer.When i printf the value and the address guess what? They both have the SAME ADDRESS but DIFFERENT values, as assigned..Here's the portion of my code:

pid = fork ();
switch (pid)
{

[code]....

View 8 Replies View Related

Programming :: Java - Doesn't Hold Integer Values

Apr 27, 2011

I have a java compiler and Im using a double intiger called Experience and when compiled and run the double intiger does not hold intiger values that are mathameticle. Like 1.5 - 1.4 will equal .100000000000000000009 and 5/3 will equal 1.0. and 1.5x 1.4 doesnt equal 2.1. Is there something I am doing wrong with double intigers? Is it the compilers fault? Could it be something thats wrong with my computer and the compilers I am using are not tat fault? Anyways double 1.5 + 1.4 does equal 2.9 so.

View 4 Replies View Related

Programming :: Bash Script 'read' With Default Values

Mar 5, 2010

I have a fallowing simple bash script:

Code:
#!/bin/bash
echo -n "Please insert your name: "
read NAME

[Code]....

It works fine, but is it possible to have default values using bash read(1b)? I mean if user is prompter for sex, he just pushes ENTER and by default 'm' is chosen. Or if user is prompted for hometown and he doesn't insert anything, but just pushes ENTER button, 'New-York' sis chosen by default Are such default values possible in bash?

View 1 Replies View Related

Programming :: MySQL And PHP - Table Column With Multiple Values?

Dec 1, 2008

I am writing a script to mine data from my game server logs which are going to mysql. My first question is syslog-ng is sticking $msg into one colum it self, $msg tends to be a long string here are a few examples:

cn name team frag death flags role host.
0 Maik CLA 2 0 0 normal *.70.233.118.
1 lizardncd RVSF -1 3 0 normal
[*.22.247.40] lizardncd fragged Maik.

And they are not always in the same format, How could I parse this data to do something useful, like creating a user stats page with frag counts and flag counts. Should I create a script that runs in a cronjob that parses this data to a new table maybe once a day. Even then the $msg string value is random and I am thinking in terms of awk.

Second. I would like to keep track of what ip's are using what nicknames. Kinda in the sense of and ip associated to a array of names that have been used on that ip address so I can keep track of users. How would this work logically with a mysql db, could a column allow multiple values, then loadable into an array, which then can add, remove, and store to mysql.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved