Jump to content

What log file for run time


Mit0s1s
 Share

Recommended Posts

I'm curious what that would look like... Maybe something like this?

cat uptime > /usr/tmp/logfilename.log

I've got a battery I'd like to benchmark under heavy load with the Mk5 also.

Edited by thesugarat
Link to comment
Share on other sites

if your wanting to just leave the pineapple running and see when it turns off maybe set a cron job to run every 15 minutes or so and have it save uptime to a file. that would be the least resource heavy way I think

uptime > uptime.log

or if you want to tax the system just a bit and use a little processor power you could do a loop in a .sh script and it will add teh uptime to the log every 60 seconds

while true
do
    uptime > uptime.log
    sleep 60
done

or if you want to use a lot more processor power as if the mk5 was under load in the field you could have the system calculate pi between logging uptime

first install bc

opkg update
opkg install bc

to calculate pi and log uptime on the mk5 add this to a .sh script. this should create a new log entry every 8 minutes or so as it will calculate pi to 5000 digits between every log update.

while true
do
    uptime > uptime.log
echo "scale=5000; 4*a(1)" | bc -l
done

and just for the hell of it if you want to know how the mk5 speed compares to a pc the mk5 should take about 8 minutes to calculate pi to 5000 digits my i7 macbook does it in 16.980 seconds, really not bad at all!

Edited by jjd
Link to comment
Share on other sites

i was trying something like this

uptime >> logfilename.txt

had no luck, couldn't get it to write a file, tried thesugarat's version and no luck either.

works for me

root@Pineapple:~# uptime > uptime.log
root@Pineapple:~# ls
uptime.log
root@Pineapple:~# cat uptime.log 
 06:22:01 up 27 min,  load average: 0.00, 0.13, 0.31
root@Pineapple:~# 
Link to comment
Share on other sites

got it going, logging away. Lets see what this battery can do, thanks jjd

not a problem!

I should also mention if your don't have an sd card in u may want to use longer times to log or save the log to an sd card if using >> as it will append to the file > will overwrite the file so it will not get larger. no idea how large the file will get but it would suck to use up all the free space and have to start all over again. that would just be a waste of pineapple juice.

Edited by jjd
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...