Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-23-2011, 06:58 PM   #1
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
fbout (redirect stdout to eink)

for developers, sysadmins.
given a command it will echo the output to your eink display.
it does it quick and dirty:

it is designed to monitor an active command (like tail -f).
it will output one line per pipe flush.
Attached Files
File Type: gz fbout.tar.gz (6.0 KB, 311 views)
fbdev is offline   Reply With Quote
Old 08-24-2011, 04:10 AM   #2
ryran
Connoisseur
ryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with others
 
Posts: 79
Karma: 2718
Join Date: Aug 2011
Device: Kindle 3G
Thumbs up

You. Rock.
I was gonna ask how hard it would be for you to put something like this together.
Thank you thank you thank you.
ryran is offline   Reply With Quote
Old 08-26-2011, 02:06 AM   #3
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
for my next trick i will read the mind of this hungry squirrel.

nuh
nuh
nuh
new
new
newts
nuts!

Quote:
Originally Posted by ryran View Post
You. Rock.
I was gonna ask how hard it would be for you to put something like this together.
Thank you thank you thank you.
fbdev is offline   Reply With Quote
Old 08-26-2011, 08:33 PM   #4
ryran
Connoisseur
ryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with others
 
Posts: 79
Karma: 2718
Join Date: Aug 2011
Device: Kindle 3G
:-)
Hey dude what is the info displayed in brackets at the beginning of the output of every fbout instance? Can it be hidden? *grin*

If it were possible to replace the question-mark-like EOL character with a more solid block, that would be awesome... wouldn't it?
ryran is offline   Reply With Quote
Old 08-26-2011, 08:39 PM   #5
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
the info in the brackets is the last thousand seconds and thousand milliseconds of the epoch.

if you've ever looked at your kprintfs (assuming your kernel was compiled with the option) you will see uptime next to the status message (seconds.microseconds).

this is a ten minute debugging app; it's not really going to get a lot of my attention. =]

Quote:
Originally Posted by ryran View Post
:-)
Hey dude what is the info displayed in brackets at the beginning of the output of every fbout instance? Can it be hidden? *grin*

If it were possible to replace the question-mark-like EOL character with a more solid block, that would be awesome... wouldn't it?
fbdev is offline   Reply With Quote
Old 08-26-2011, 08:49 PM   #6
ryran
Connoisseur
ryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with others
 
Posts: 79
Karma: 2718
Join Date: Aug 2011
Device: Kindle 3G
I see. Coolio.
For the record, I see quite a use for it, outside of simple debugging. At the moment, I use it for various random launchpad + nix commands, but I've also got a suite of scripts to manage kinamp/mplayer: toggling shuffle/repeat, skipping between different genres & albums .... and I love getting on-screen feedback for that stuff. It works beautifully well enough as it is though--I was just being perfectionist.
ryran is offline   Reply With Quote
Old 08-26-2011, 10:16 PM   #7
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
you should post them.

scripts are applications, too.

Quote:
Originally Posted by ryran View Post
I see. Coolio.
For the record, I see quite a use for it, outside of simple debugging. At the moment, I use it for various random launchpad + nix commands, but I've also got a suite of scripts to manage kinamp/mplayer: toggling shuffle/repeat, skipping between different genres & albums .... and I love getting on-screen feedback for that stuff. It works beautifully well enough as it is though--I was just being perfectionist.
fbdev is offline   Reply With Quote
Old 08-27-2011, 06:05 AM   #8
ryran
Connoisseur
ryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with others
 
Posts: 79
Karma: 2718
Join Date: Aug 2011
Device: Kindle 3G
I figured I would eventually... I always share my scripts. I've been tweaking them heavily every other day though.

Did you tell people to put your apps in /mnt/us/system just for simplicity? I run kaffeine & kinamp & fbout so much that it made the code so much cleaner-looking to get them in my path. Is there a reason you know of why I shouldn't add things to /usr/bin? I haven't had any probs yet, but I haven't taken the time to snoop everywhere yet.
ryran is offline   Reply With Quote
Old 08-27-2011, 12:13 PM   #9
PoP
Antonín ♯♭♪♮♫ ᵖʸᶠᵍᶜʳˡ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 521
Karma: 7391817
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
Quote:
Originally Posted by fbdev View Post
for developers, sysadmins.
given a command it will echo the output to your eink display.
it does it quick and dirty:

it is designed to monitor an active command (like tail -f).
it will output one line per pipe flush.
How do you give it a command, ./fbout command or command | ./fbout or what?
PoP is offline   Reply With Quote
Old 08-27-2011, 02:22 PM   #10
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
i try to avoid modifying the root file system.

0) i am of the opinion that when i boot my kindle it ought to work; making changes to the root file system is the best way to make it do otherwise. =]

1) there are heavy space constraints on the root file system.
iirc, vanilla it has about 150 mb free.

2) if you want an exe in your path, use a symlink.

3) if you want a userspace folder in your path, modify /etc/profile.

in short, there isn't any really good reason to modify the root filesystem for drop-in executables and the first rule of *nix administration is to minimize the use of privileged operations. qed, i don't modify the root filesystem.

Quote:
Originally Posted by ryran View Post
I figured I would eventually... I always share my scripts. I've been tweaking them heavily every other day though.

Did you tell people to put your apps in /mnt/us/system just for simplicity? I run kaffeine & kinamp & fbout so much that it made the code so much cleaner-looking to get them in my path. Is there a reason you know of why I shouldn't add things to /usr/bin? I haven't had any probs yet, but I haven't taken the time to snoop everywhere yet.
fbdev is offline   Reply With Quote
Old 08-27-2011, 02:26 PM   #11
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
the complete answer to this question is complicated.

i usually use it like this:
# while sleep 1; do awk '{ print $15 }' /proc/`pgrep cvm`/stat; done|/tmp/fbout

Quote:
Originally Posted by PoP View Post
How do you give it a command, ./fbout command or command | ./fbout or what?
fbdev is offline   Reply With Quote
Old 08-27-2011, 02:35 PM   #12
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
you can think of it a little like a cross between
# watch ls
and
# ls|xargs
fbdev is offline   Reply With Quote
Old 08-27-2011, 03:01 PM   #13
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
one thing i REALLY hate about shell scripting is that it's so cryptic.
if C is beautiful, and it is, bash and perl are on the wrong end of the ugly stick in a hurricane.

let me explicate this bit of code.

while sleep 1:
loop until interrupt at one second intervals

; do
now the body of the loop

awk '{ print $15 }'
print the fifteenth column of a file

`pgrep cvm`
the pid of cvm (the java framework)

/proc/`pgrep cvm`/stat
the name of the file is:
/proc/4455/stat
if the pid of the cvm process is 4455

the stat file holds process statistics for a process.
column 15 of this file is the user mode jiffies (think cpu cycles used) for the process.
more info on the stat file.

; done
end of the loop body

|/tmp/fbout
send the output of this loop to the framebuffer.

putting the pipe at the end of the loop instead of here:
# while sleep 1; do awk '{ print $15 }' /proc/`pgrep cvm`/stat|/tmp/fbout; done

causes executions of the command to reuse the pipe instead of reopening it every time.

Quote:
Originally Posted by fbdev View Post
the complete answer to this question is complicated.

i usually use it like this:
# while sleep 1; do awk '{ print $15 }' /proc/`pgrep cvm`/stat; done|/tmp/fbout
fbdev is offline   Reply With Quote
Old 08-27-2011, 03:06 PM   #14
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
come for the code; stay because you don't know what the hell is going to come out of my mouth next.

Quote:
Originally Posted by fbdev View Post
if C is beautiful, and it is, bash and perl are on the business end of the ugly stick in a hurricane.
fbdev is offline   Reply With Quote
Old 08-27-2011, 04:28 PM   #15
PoP
Antonín ♯♭♪♮♫ ᵖʸᶠᵍᶜʳˡ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 521
Karma: 7391817
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
Quote:
Originally Posted by fbdev View Post
i usually use it like this:
# while sleep 1; do awk '{ print $15 }' /proc/`pgrep cvm`/stat; done|/tmp/fbout
hummmm...

Quote:
Originally Posted by fbdev View Post
you can think of it a little like a cross between
# watch ls
and
# ls|xargs
...better...

Quote:
Originally Posted by fbdev View Post
one thing i REALLY hate about shell scripting is that it's so cryptic.
if C is beautiful, and it is, bash and perl are on the wrong end of the ugly stick in a hurricane.
let me explicate this bit of code.
[explanation snip ]
...Ahhh, now I see! Thanks for taking the time.
PoP is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
oeb:redirect Hyperlinks to different ebook (on the Kindle) Kitard Kindle Developer's Corner 1 07-17-2010 01:02 PM
Alternativen zu eInk gromit62 Deutsches Forum 1 05-29-2010 03:36 PM


All times are GMT -4. The time now is 12:34 PM.


MobileRead.com is a privately owned, operated and funded community.