View Full Version : msabramo's tivo utils - lsof, dialog, md5, mutt, pstree, perl
msabramo
12-04-2004, 02:54 PM
lsof 4.73 (and a bunch of other stuff), compiled for Series 2, is now available at my TiVo page (http://www.geocities.com/marcstanford/tivo.html)
lsof lists open files, either by process if you supply -p <pid>, or globally on the system, and so it should probably be useful for learning more about how programs work.
Examples:
root@tivo:/var# lsof -p 258
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sshd 258 root cwd DIR 3,7 1024 2 /
sshd 258 root rtd DIR 3,7 1024 2 /
sshd 258 root txt REG 3,7 1398008 20784 /marc/bin/sshd
sshd 258 root mem REG 3,7 126215 2051 /lib/ld.so.1
sshd 258 root mem REG 3,7 18120 2066 /lib/libutil.so.1
sshd 258 root mem REG 3,7 442602 20787 /marc/lib/libnsl.so.1
sshd 258 root mem REG 3,7 1743466 20785 /marc/lib/libcrypto.so.0.9.7
sshd 258 root mem REG 3,7 34467 2053 /lib/libcrypt.so.1
sshd 258 root mem REG 3,7 1606890 2054 /lib/libc.so.6
sshd 258 root mem REG 3,7 10808 20786 /marc/lib/libdl.so.2
sshd 258 root mem REG 3,7 116361 20770 /marc/lib/libgcc_s.so.1
sshd 258 root 0u CHR 1,3 22535 /dev/null
sshd 258 root 1u CHR 1,3 22535 /dev/null
sshd 258 root 2u CHR 1,3 22535 /dev/null
sshd 258 root 3u inet 574 TCP *:ssh (LISTEN)
You can also run it with no args and get a huge list of files.
msabramo
12-04-2004, 03:32 PM
dialog (http://invisible-island.net/dialog/) 1.0 (and a bunch of other stuff), compiled for Series 2, is now available at my TiVo page (http://www.geocities.com/marcstanford/tivo.html)
dialog (http://invisible-island.net/dialog/) is a command that can be called from shell scripts, TCL scripts, C programs, etc... to display curses-based "widgets" such as:
--calendar <text> <height> <width> <day> <month> <year>
--checklist <text> <height> <width> <list height> <tag1> <item1> <status1>...
--form <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1>...
--fselect <filepath> <directory> <height> <width>
--gauge <text> <height> <width> [<percent>]
--infobox <text> <height> <width>
--inputbox <text> <height> <width> [<init>]
--inputmenu <text> <height> <width> <menu height> <tag1> <item1>...
--menu <text> <height> <width> <menu height> <tag1> <item1>...
--msgbox <text> <height> <width>
--passwordbox <text> <height> <width> [<init>]
--radiolist <text> <height> <width> <list height> <tag1> <item1> <status1>...
--tailbox <file> <height> <width>
--tailboxbg <file> <height> <width>
--textbox <file> <height> <width>
--timebox <text> <height> <width> <hour> <minute> <second>
--yesno <text> <height> <width>
(this list was generated by running "dialog --help")
I am hoping that people can leverage "dialog" to create apps or use it to create nice, easy to use installers and config programs.
Here's just one sample usage to whet your appetite:
dialog --calendar "Choose a date" 0 0 04 12 2004
Enjoy.
msabramo
12-07-2004, 03:57 AM
md5 mips binary, together with source code now available at my TiVo web page: http://www.geocities.com/marcstanford/tivo.html
msabramo
12-11-2004, 05:23 AM
I compiled mutt for TiVo Series 2 (MIPS). Why? I don't know - cross-compiling is addictive and I was bored and curious if I could get it to work. Perhaps someone will come up with a clever way of using it to do something really interesting with the TiVo. After compiling this, I copied my mbox from my BSD box at work to /var/mail/root on the TiVo and fired up mutt briefly to verify that I could browse my mailbox. Of course, this is in your terminal window, not on your television, and if you're reading this, you probably already have a Linux/BSD/Cygwin/OS X rig with mutt, so maybe this is not all that exciting. But maybe I'm overlooking possibilities, so I'll just publish and see what happens.
Certainly, you don't have to use it in interactive mode; you could use the command-line mode to send emails from your TiVo box, which could be interesting, although at 915 KB, this binary is probably overkill for that purpose :-) and I'm sure there must be versions of mailx floating around.
Download mutt for Series 2 TiVo at Marc's TiVo Hacks (http://www.geocities.com/marcstanford/tivo.html)
msabramo
12-11-2004, 05:43 PM
A super small utility (it was only a single source file) written by some folks in Germany that displays running processes in a tree, so that you can see the parent/child relationships - kind of interesting to get another view of how the system works. Only consisting of a single source file, it was trivial to cross-compile, so if you're trying out a new cross-compiler environment, this one would be a simple test of your setup.
pstree - TiVo Series 2 (MIPS) binary at Marc's TiVo Hacks (http://www.geocities.com/marcstanford/tivo.html)
pstree - Source code (http://www.thp.uni-duisburg.de/ftpdoc.html)
Any interest in seeing a TiVoWeb module that wraps this? It wouldn't be revolutionary, but I'd like to try my hand at writing modules and my Tcl is rusty so I thought I could start with something really simple.
msabramo
12-19-2004, 12:47 AM
It took a fair amount of hacking, but I managed to build Perl 5.8.5 for TiVo Series 2 (MIPS).
I haven't done very much testing with it except for really basic scripts and I wouldn't be at all surprised if it's depending on some .so's that are on my system but not commonly found on a TiVo. If this is the case, then I hope people will post their experiences and I will evolve the package to make it as easy to install as I can.
I am hoping that having Perl will open up TiVo development to folks who wouldn't have bothered before, because they know Perl better than Tcl.
The Perl 5.8.5 for TiVo Series 2 package is available for download at my TiVo web page: http://www.geocities.com/marcstanford/tivo.html
fixn278
12-19-2004, 01:09 AM
You seem to have hit the limit on our account. If you want, pm me and I can put a copy on pvrfiles.com
rc3105
12-19-2004, 01:20 AM
OR, shockingly enough, attach them to posts here in the files section
;)
msabramo
12-19-2004, 02:29 AM
OR, shockingly enough, attach them to posts here in the files section
;)
There is a 2 meg limit on attachments here.
rc3105
12-19-2004, 03:36 AM
so learn how to segment zip/tar/rar files instead of cluttering the files forum with links to a dead page :rolleyes:
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.