I apologize for not getting back to you sooner. When I saw some of your responses below, I guess I just lost interest.
Quote:
Originally Posted by
lowmaster
Quote:
Originally Posted by
Don Cragun
If you want to keep I/O to a flashdrive to a minimum, why are you accessing that flashdrive at least four times every 4 seconds?
Thats a good point! I need to fix this. 8-)
So, have you done anything to fix this in the last six weeks?
Quote:
Originally Posted by lowmaster
Quote:
Originally Posted by Don Cragun
If you have a list of strings to search for, why do you have to test every four seconds whether or not your list exists?
The list changes, but reading it once every hour should be sufficient
OK. Have you made any changes to your script to only check this file once per hour?
Quote:
Originally Posted by lowmaster
Quote:
Originally Posted by Don Cragun
If you have a program you want to run every 4 seconds and you want to minimize accesses to a flashdrive, why is the program you want to run on a flashdrive?
What does /var/media/ftp/look.sh do? Does it invoke any other software that is located on that flashdrive? Does it access any other files that are located on that flashdrive?
Look.sh calls a system internal function which goes through a set of arrays with which you can output several information. in this case I just let output clients in the network and its state (active/online)
That didn't answer either question.
Is
/var/media/ftp/look.sh dependent on anything on the flashdrive? I.e., can we copy it off of the flash drive into
/tmp and run it from there (which would change the number of accesses to the flashdrive from once every four seconds to just once)? And, why is it on your flashdrive at all? Why isn't it in your
$HOME/bin directory instead?
Quote:
Originally Posted by lowmaster
Quote:
Originally Posted by Don Cragun
Why are any of these files on a flashdrive if you don't want to access the flashdrive?
it is how it is...
This is what made me lose interest in this thread. If it is how it is and you aren't interested in changing it, why should we bother making suggestions?
Quote:
Originally Posted by lowmaster
Quote:
Originally Posted by Don Cragun
What output does /var/media/ftp/look.sh produce?
lines in the output like in the alertlist.txt
OK. Thanks. That helps.
Quote:
Originally Posted by lowmaster
Quote:
Originally Posted by Don Cragun
Can a string in /var/media/ftp/alertlist.txt appear in the output from /var/media/ftp/look.sh more than once?
If you mean as a part of a string yes. so if alertlist.txt contains hans, look.sh could output this what I would like to have considered
hans
hansolo
Hansala
Hans joined
Hansala left
Hans left
hansolo joined
etc...
No, that is not what I meant. Can
look.sh return two or more lines containing a name like
hans? (Presumably, this would indicate that two or more wifi stations have detected that
hans is within range.) If a given name can be reported more than once, does your script need to report that a user appears or disappears, or does it need to report that the number of times a user appears has changed?
Quote:
Originally Posted by lowmaster
Quote:
Originally Posted by Don Cragun
If these strings are people's names or login IDs, do you really need case insensitive matches? Are UserName and username to be treated as different strings or as a single string?
ideally yes
OK. I assume this is because whoever is editing
alertlist.txt is careless with the shift key when adding names to the list.
Quote:
Originally Posted by
lowmaster
It sounds like this might work perfectly for you... if you do NOT want to reduce the number of times your flashdrive is accessed.