Re: log-collect / log-send
Pascal, I have been working on something similar. It is a console script that gather networks related logs, and will be available in the next joyride. At the moment it includes: var/log/messages var/log/xorg.0.log /home/olpc.sugar.logs/presenceservice /home/olpc.sugar.logs/gabble /home/olpc.sugar.logs/salut and the following info: build firmware model time mac ips of all interfaces network topology jabber server salut or gabble The gzipped tar is ~20kb which is pretty low. However, other tests(for specific activites for ex.) will require other logs. I believe that a complete log activity should have a list of options like: network logs kernel logs activities logs all logs ...so the user can choose according to the problem also, the activity should be able to enable All Logs, from the .xinitrc, .sugar.debug files, or perhaps the full kernel logs. I was planning to add the above features in my script, but a sugar activity is better than a console script. Since we are working on the same thing we can use each other's help, and create a single application. yani On 10/29/07, Pascal Scheffers [EMAIL PROTECTED] wrote: I've created a rough-cut log-collector, it's in d.l.o/git/project/log- activity/log-collect.py For now, it just outputs some system info, tell me what's missing or what would be interesting to include? I don't know yet how to list installed activities... would that be just `ls /usr/share/activities/`? Or is there a package list? And then the main purpose: sending logs to OLPC, either using http- post or email or usb-stick or... but what logs should I collect? Just all of them? ~/.sugar/default/logs/* and /var/log/* ? Or should it be more selective? And some information from the journal, perhaps? What about privacy/sensitive information? Will there be any in the logs or system info? - Pascal Current log-activity.py output: bios-version: Q2C18 uptime: 434169.21 430235.72 wireless_mac: 00-17-C4-05-2A-58 uuid: 8A401F4E-E312-47F9-96C8-A488C99BDA2F localization: ?? kernel_version: Linux version 2.6.22-20071018.1.olpc.d4414541d2be66a ([EMAIL PROTECTED]) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 PREEMPT Thu Oct 18 11:44:14 EDT 2007 diskfree: 716 MB laptop-info-version: 0.1 memfree: 63496 kB serial-number: SHF7250025C disksize: 1024 MB keyboard: ??-??-?? olpc_build: OLPC build joyride 58 (stream joyride; variant devel_jffs2) country: USA board-revision: B4 motherboard-number: QTFLCA72400063 POWER_SUPPLY_NAME=olpc-battery POWER_SUPPLY_TYPE=Battery POWER_SUPPLY_STATUS=Full POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_TECHNOLOGY=LiFe POWER_SUPPLY_VOLTAGE_AVG=6792960 POWER_SUPPLY_CURRENT_AVG=0 POWER_SUPPLY_CAPACITY=97 POWER_SUPPLY_CAPACITY_LEVEL=Full POWER_SUPPLY_TEMP=2508 POWER_SUPPLY_TEMP_AMBIENT=4300 POWER_SUPPLY_ACCUM_CURRENT=8390 POWER_SUPPLY_MANUFACTURER=BYD POWER_SUPPLY_SERIAL_NUMBER=5d0d0100daff ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: log-collect / log-send
On 10/31/07, Pascal Scheffers [EMAIL PROTECTED] wrote: Is there any chance that either or both of our console scripts make it to MP? Or has that time passed? I got the impression last sunday that that is what we were trying to shoot for... Code freeze is this Friday... Hurry up! :) Marco ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: log-collect / log-send
On 31-okt-2007, at 8:54, Tomeu Vizoso wrote: what about the output from top/ps/free/df? Sure. Consider them added. Perhaps some jffs2 status Right now, I just have disksize and diskfree. Tell me where I can find jffs stats, and I'll include them too. - Pascal. ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Now with http-post! Re: log-collect / log-send
I've updated log-collect.py, it can now auto-submit the logs to my own server: invoke as: [EMAIL PROTECTED] ~]$ su - -bash-3.2# python log-collect.py http log-collect utility 1.0 Logs saved in /dev/shm/logs-SHF725002EF.zip Trying to send the logs using HTTP (web) OK Logs were sent. -bash-3.2# And admire the result at http://pascal.scheffers.net/olpc/ The URL where the zip file will be posted is hardcoded, for now. You can either download the zip file which was submitted, or you can browse/view the contents of the zip file on my site. The server side component is very, very, very simple: just accept any file, give it a fixed name and then try to unzip it. - Pascal. On 31-okt-2007, at 1:28, Eduardo Silva wrote: Hi Guys, I have been working on something similar. It is a console script that gather networks related logs, and will be available in the next joyride. Would be better focus to develop just a main class to collect this information and different front-ends as a console script and the UI interface under the log activity. In this way we can avoid to duplicate code. Giannis, where is your source code?, can be cool if you and Pascal can merge a final python class. I was planning to add the above features in my script, but a sugar activity is better than a console script. Since we are working on the same thing we can use each other's help, and create a single application. both can be useful, but using just ONE collector ;) cheers. Eduardo. ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: log-collect / log-send
Pascal, I have been working on something similar. It is a console script that gather networks related logs, and will be available in the next joyride. At the moment it includes: var/log/messages var/log/xorg.0.log /home/olpc.sugar.logs/presenceservice /home/olpc.sugar.logs/gabble /home/olpc.sugar.logs/salut and the following info: build firmware model time mac ips of all interfaces network topology jabber server salut or gabble The gzipped tar is ~20kb which is pretty low. However, other tests(for specific activites for ex.) will require other logs. I believe that a complete log activity should have a list of options like: network logs kernel logs activities logs all logs ...so the user can choose according to the problem also, the activity should be able to enable All Logs, from the .xinitrc, .sugar.debug files, or perhaps the full kernel logs. I was planning to add the above features in my script, but a sugar activity is better than a console script. Since we are working on the same thing we can use each other's help, and create a single application. yani On 10/29/07, Pascal Scheffers [EMAIL PROTECTED] wrote: I've created a rough-cut log-collector, it's in d.l.o/git/project/log- activity/log-collect.py For now, it just outputs some system info, tell me what's missing or what would be interesting to include? I don't know yet how to list installed activities... would that be just `ls /usr/share/activities/`? Or is there a package list? And then the main purpose: sending logs to OLPC, either using http- post or email or usb-stick or... but what logs should I collect? Just all of them? ~/.sugar/default/logs/* and /var/log/* ? Or should it be more selective? And some information from the journal, perhaps? What about privacy/sensitive information? Will there be any in the logs or system info? - Pascal Current log-activity.py output: bios-version: Q2C18 uptime: 434169.21 430235.72 wireless_mac: 00-17-C4-05-2A-58 uuid: 8A401F4E-E312-47F9-96C8-A488C99BDA2F localization: ?? kernel_version: Linux version 2.6.22-20071018.1.olpc.d4414541d2be66a ([EMAIL PROTECTED]) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 PREEMPT Thu Oct 18 11:44:14 EDT 2007 diskfree: 716 MB laptop-info-version: 0.1 memfree: 63496 kB serial-number: SHF7250025C disksize: 1024 MB keyboard: ??-??-?? olpc_build: OLPC build joyride 58 (stream joyride; variant devel_jffs2) country: USA board-revision: B4 motherboard-number: QTFLCA72400063 POWER_SUPPLY_NAME=olpc-battery POWER_SUPPLY_TYPE=Battery POWER_SUPPLY_STATUS=Full POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_TECHNOLOGY=LiFe POWER_SUPPLY_VOLTAGE_AVG=6792960 POWER_SUPPLY_CURRENT_AVG=0 POWER_SUPPLY_CAPACITY=97 POWER_SUPPLY_CAPACITY_LEVEL=Full POWER_SUPPLY_TEMP=2508 POWER_SUPPLY_TEMP_AMBIENT=4300 POWER_SUPPLY_ACCUM_CURRENT=8390 POWER_SUPPLY_MANUFACTURER=BYD POWER_SUPPLY_SERIAL_NUMBER=5d0d0100daff ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: log-collect / log-send
Hi Guys, I have been working on something similar. It is a console script that gather networks related logs, and will be available in the next joyride. Would be better focus to develop just a main class to collect this information and different front-ends as a console script and the UI interface under the log activity. In this way we can avoid to duplicate code. Giannis, where is your source code?, can be cool if you and Pascal can merge a final python class. I was planning to add the above features in my script, but a sugar activity is better than a console script. Since we are working on the same thing we can use each other's help, and create a single application. both can be useful, but using just ONE collector ;) cheers. Eduardo. ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: log-collect / log-send
Eduardo, There is a wiki page with some similar info: http://wiki.laptop.org/go/Developer_Environment I just realized that this page is created and edited by you So you have written scripts for this purpose as well? I have attached my two scripts. The are written in bash, but they are not commented netstatus gathers network info like: mac ip eth0,msh0,eth1,etc dns jabber server MPP,AP,schoolserver,linklocal gabble/salut netlog gathers the following: output from netstatus info file with build,firmware,model messages Xorg.0.log (thanx Jim for the comment in the trac) presenceservice.log gabble.log salut.log yani On 10/30/07, Eduardo Silva [EMAIL PROTECTED] wrote: Hi Guys, I have been working on something similar. It is a console script that gather networks related logs, and will be available in the next joyride. Would be better focus to develop just a main class to collect this information and different front-ends as a console script and the UI interface under the log activity. In this way we can avoid to duplicate code. Giannis, where is your source code?, can be cool if you and Pascal can merge a final python class. I was planning to add the above features in my script, but a sugar activity is better than a console script. Since we are working on the same thing we can use each other's help, and create a single application. both can be useful, but using just ONE collector ;) cheers. Eduardo. netlog Description: Binary data netstatus Description: Binary data ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: log-collect / log-send
On 10/29/07, Pascal Scheffers [EMAIL PROTECTED] wrote: I've created a rough-cut log-collector, it's in d.l.o/git/project/log- activity/log-collect.py For now, it just outputs some system info, tell me what's missing or what would be interesting to include? My list from the whiteboard here (some of this you may already be including): a) the current date and time on the machine (in case the clock is set far to the future or past) b) what OS build? What firmware build? (i think you've got these already) c) output of /usr/bin/uptime d) network statistics -- can it reach www.laptop.org? what DNS is it using? basically, the output of /sbin/ifconfig, /sbin/route -n, and the contents of /etc/resolv.conf. I don't know yet how to list installed activities... would that be just `ls /usr/share/activities/`? Or is there a package list? /usr/share/activities and /home/olpc/Activities. Sugar might also provide an enumeration; I don't know. And then the main purpose: sending logs to OLPC, either using http- post or email or usb-stick or... but what logs should I collect? Just all of them? ~/.sugar/default/logs/* and /var/log/* ? Or should it be more selective? Probably the last 1k or so of each log, but there may be a --full command-line option to include the whole thing. I'd say http post is probably the most robust, but if the problems have to do with network connectivity, they'll want to put the logs on a USB stick or SD card. What about privacy/sensitive information? Will there be any in the logs or system info? Don't include the UUID. Other stuff should be okay. --scott -- ( http://cscott.net/ ) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel