Home- Data Collection- Data Mining- GPL Software- Services- FAQ- Tips


Secure Shell

After installing Linux, connect the PC over the network using secure shell. From a Linux machine command line use.
ssh -l data ip.of.the.machine

From a Windows machine use PuTTY, enter the IP address of the remote machine and choose SSH port 22. This should give you a login prompt for the remote machine.


You are going to need some basic knowledge of the vi editor to edit the crontab.
Basic Commands
[Esc]:w    Save
[Esc]:wq   Save and quit
[Esc]:q!   Quit, don't save
[Esc]i     Insert mode
[Esc]x     Delete 
[Esc]dd    Delete line
[Esc]      Quit insert mode

Secure Copy

You can copy files using the PuTTY SCP tool for Windows. Download PSCP and put in your windows directory.
To move a file from your windows box to the Linux box use this command
pscp localfile.txt user@

To move a file from the Linux box to the windows box use this command
pscp user@ localfile.txt

Shell Commands

To find out how much disk space your Linux box has use
To find out how many Inodes(file handles) you have use
   df -i
Show network connections
   netstat -an
Edit a file
   vi filename.txt
List directory contents
List directory contents verbose
   ls -al
Show all processes running
   ps -aux

Saving disk space

When monitoring the status of a bit it is usually desirable to create a record when the bit turns on and when the bit turns off. In cases such as monitoring a door, knowing when the door was opened and when the door was closed is important. In cases such as monitoring a door bell (momentary switch) all you really need to know is that the switch was pressed on. Creating a record for the switch turning on is important, creating a record for the bit turning off is not important. We call this type of record an event. After you get you system running you may want to filter out event records that are the result of the bit turning back off after the event occurs. Rather than modifying the program that is doing the monitoring to not record the data, it is better to delete the data after it goes into the data table.
We usually use element 0 for event data. If you follow this also, simply uncomment this line in your sync.php script. Each time sync runs the 0 value event records will be deleted from the data table.

$sql="DELETE FROM data_bit WHERE element = 0 AND value = 0";

Home- Data Collection- Data Mining- GPL Software- Services- FAQ- Tips Logo