libera/#maemo/ Wednesday, 2018-10-17

brolin_empeyLow priority but interesting/novel problem to solve: Is it feasible to programatically insert the output of a shell command into a cell in a spreadsheet in Google Sheets?  My use case: I have a table (spreadsheet in Google Sheets) for tracking the resources of servers of a company.  One of the columns is for the amount of disk space actually used in the container as opposed to the maximum size/allocated size.  Currently I manually run df in a shell and copy06:31
brolin_empeyand paste part of the output into the table but it would be neat to automate this process so it could run regularly, such as every week or month.06:31
OksanaJust make sure Google Sheets does not take over your computer ;-)06:43
brolin_empeyOksana: Care to explain?  I do not try to use Google Sheets on the N900 with only 256 MiB of main memory. :-P06:44
OksanaAs in, if Google Sheets can execute command in a shell on a server, then Google Sheets could potentially take over the computer?07:24
KotCzarnyusing spreadsheet instead scripting+db to get automated data gathered seems like something done by someone completely computer illiterate07:34
KotCzarny'oh, hey, just run this vbs in your excel, dont worrry, it's a completely safe and harmless'07:36
brolin_empeyOksana: I was thinking of having a scheduled task on a computer I control run a script/command that runs df on the containers, filters the output, and somehow updates the cells in Google Sheets.07:39
brolin_empeyI think it may be possible but I have not researched it because the priority is too low but this problem interests me so I took the time to ask here.07:41
KotCzarnywhy not cacti?07:41
brolin_empeyKotCzarny: cacti?07:42
KotCzarnydata monitoring software07:42
KotCzarnywith big flexibility and plenty of features07:42
brolin_empeyActually, I think we are already using NewRelic on at least some servers;  maybe that is relevant here?07:43
KotCzarnymight be, if it does similar thing, dont rewrite the wheel07:45
brolin_empeyI do not use BSD so I do not use wheel. ;-)07:45
KotCzarnymonitoring software usually use snmp to gather standard data instead of running random things07:46
brolin_empeydf is standard in *nix, not a random thing.07:46
inzsnmpd can be made to run random things on request :)07:48
rhombusI keep losing data on my N900 when I mount the device22:34
rhombusas USB mass storage22:34
rhombusand I thought I was doing everything properly22:34
sicelo'losing data' - how?22:35
rhombussicelo: I write notes using the Notes app22:35
rhombussicelo: I try to remember to save regularly22:35
rhombussicelo: but sometimes I just close the app22:35
rhombussicelo: normally, when I open it again, I see all my recent entries22:36
rhombusbut even if I close everything, attach the device, mount it as mass storage...22:36
rhombus1. I don't see the most recent version22:36
rhombusand 2. when I unmount it and try and look at the notes file again, I get a message saying the file could not be restored22:37
rhombusI just lost another day's worth of notes :(22:37
rhombusIs there any way for me to recover this data?22:38
sicelono idea. that has never happened to me. i close the application without ever saving, and have never lost anything.22:39
sicelomaybe you should consider a different application, e.g. Xournal?22:39
rhombussicelo: are you routinely mounting the N900 as a USB mass storage device, or do you move everything over the network?22:40
rhombusI recall someone mentioning -- perhaps Jörg -- that you have to be very careful here or you can damage files22:41
siceloi don't mount usb storage much lately, but i've done that lots of times in my 7 years of ownership. never lost a note. yes, i probably don't use them as much as you do22:41
rhombushmmm22:41
rhombussicelo: where are the files stored? I have a directory called .documents, but that seems to contain old versions of the files22:42
siceloNotes seems to save in the last directory you opened something from.22:43
rhombusnot in some default?22:43
sicelono22:43
siceloyou can see the current save directory like so:22:44
rhombusbut Notes saves backup files somewhere, and those must be automatic...22:45
sicelogconftool-2 -g /apps/osso/osso-notes/default_folder22:45
siceloi am no expert, but from what i've seen, there's no separate backup. Notes just (tries to) cleanly save to the actual file each time. i could be wrong22:47
rhombusOk -- so clearly is something wrong here22:47
rhombus*there22:47
rhombusNotes is saving in a hidden directory -- is that normal?22:47
rhombus.documents22:47
siceloyes. normal22:47
siceloit is what you see as MyDocs/Documents in File Manager :)22:48
siceloand since you mount it to USB a lot, you would have notice. what is the host OS?22:48
rhombusBut in Filemanager there is no MyDocs22:48
rhombusjust Documents22:48
rhombusand it contains different files22:49
rhombusJust now it was Windows22:49
rhombusbut it has happened with Linux also22:49
sicelook. scratch out MyDocs. N900/Documents in File Manager22:50
rhombusdo you mean Nokia N900?22:51
siceloi wonder if you're not guilty of saving to Documents while it's mounted via USb, which is probably what may have been meant by Joerg22:51
rhombussicelo: I thought that's why he warned me to close everything before mounting via USB22:51
rhombuswhich is what I just did22:51
rhombusbut then I couldn't find the most current state of the file on the host machine22:52
rhombusand when I unmounted and tried to open it again with Notes, it gave me an error message saying the restore had failed22:52
rhombussomething can't be right here22:52
siceloif you write to Documents (or anywhere else that's accessible via File Manger) while the drive is mounted via USB, you will of course end up with a tricky situation22:52
rhombussicelo: I have the following files22:53
sicelohere's a page you might want to get familiar with: https://wiki.maemo.org/N900_filesystem22:54
siceloand, https://wiki.maemo.org/MyDocs_folder22:55
rhombusthanks22:56
rhombuscan I change the default folder with gconftool-2?22:58
siceloi don't know how Notes will like that. you could try.22:59
siceloi don't think you really need to, though23:00
sicelojust choosing a save directory from within notes should set it23:00
rhombusok23:01
rhombusI wonder how this happened in the first place23:01
sicelowhat?23:02
rhombuswell, that I have files that used to be in .documents that are now in documents23:03
rhombusand that I keep losing my most recent changes when I do mounts, even though everything is ostensibly closed23:03
siceloif you check the links I gave you, you would notice that MyDocs/.documents = "Nokia N900/Documents"23:04
rhombusyeah, but I also have Nokia N900/documents23:04
siceloyou created it?23:05
rhombusprobably, but I don't recall23:05
rhombusNotes does not seem to have a Save As function23:06
siceloyup23:06
rhombussicelo: so how am I supposed to change the default directory?23:06
siceloNew Document - Save :)23:06
sicelobut remember, default directory is not fixed .. it keeps getting set to wherever you last open a document from23:07
siceloi do think *you* need a better Notes application. Check the repositories for something you like23:08
siceloi use xournal, because it allows me to use stylus & scribble. it allows text input by keyboard, but i found the text entry mechanism lacking. i am sure there are others23:09
rhombussicelo: Notes must be backing things up somewhere -- how else can there be a discrepancy between what I see in .documents and what is actually open in Notes? (for example, time stamps from yesterday, even though I have been saving since then)23:10
rhombusok, xournal23:10
rhombuscould the backups be in one of the .osso directories?23:10
siceloyou can try lsof to see what files Notes keeps open (sorry can't help much with that ...)23:11
rhombusthere's a file here called "startup-restored-flag"23:11
rhombusaha23:11
rhombusthere's also23:11
rhombus~/.osso/osso-notes23:12
sicelonice then23:13
rhombuswhich contains autosave.0-Espanol.note.html.note.html (which is for an old file I don't think I have anymore)23:14
rhombusunfortunately23:14
rhombusthe data I am looking for is not there23:14
rhombusthen there is .permanent-state23:14
rhombuswhich has a bunch of file URIs to an autosave of a file I just had open23:15
rhombusvery wierd23:15
rhombusI guess I'll try switching to xournal23:15
sicelodoesn't have to be xournal. check repositories for somethingt hat'll suit you.23:16
siceloseems there's a qmlnotes23:20
sicelomight be worth a try23:20
rhombusok23:22
rhombusok, I've started by changing the default save folder23:25
rhombusbut you are right, notes is a pain23:25
rhombusit's buggy23:25
sicelomany f the osso* applications are23:26
sicelo*of23:26
rhombus(when I save rich text files with bullet points, it adds an additional bullet point with each save operation)23:26
rhombusmaybe that explains the restore failures also23:26
sixwheeledbeastrhombus: osso-notes is weird. IIRC it saves files in XML format23:35
rhombussixwheeledbeast: exactly!23:35
sixwheeledbeastI mostly use leafpad23:35
rhombussixwheeledbeast: I've just installed "Notes" and "mnotes"23:36
rhombusand now I will install leafpad :)23:36
rhombussixwheeledbeast: but yeah, osso-notes has a bug where it keeps nesting bullet list items23:37
rhombusxml is notoriously difficult to do correctly23:39
rhombuswhich is why I can't understand why it is such a popular format23:39
sixwheeledbeastValidation23:41
sixwheeledbeastAnyway I found osso-notes annoying to use within months of having my N900 and switched to leafpad for GUI text editing23:42
rhombussixwheeledbeast: yeah, I should have switched sooner23:43
rhombus:/23:43
rhombusinertia, I guess23:43
rhombusnow that I've lost hours of notes twice in the last two weeks, I'm done with it23:43
rhombusthanks for the tips sicelo, sixwheeledbeast23:44
rhombusI'm going to hit the sack23:44
siceloyw23:44
sixwheeledbeastI can only think to look in .osso23:44
rhombussixwheeledbeast: for the possible backups?23:44
sixwheeledbeastyer23:44
rhombusyeah, there were some old autosave files there, unfortunately no sign of my data :(23:44
sixwheeledbeasttmp?23:45
rhombushmm23:45
sixwheeledbeastRun some sort of grep on text files?23:45
sixwheeledbeastJust throwing ideas23:46
rhombussixwheeledbeast: thanks, those are good ideas23:47
rhombusI'll give them a try tomorrow23:47
rhombusthanks again23:47
sixwheeledbeastIts a closed program so you can't work it out from the source where backups would be23:47
sixwheeledbeastnp23:47
rhombusall the more reason NOT to use it23:47
rhombus:)23:47
rhombusg'night23:48
sixwheeledbeastleafpad is on the Free Maemo wiki ;)23:48
sixwheeledbeastgn23:48
sixwheeledbeastas replacement23:48
rhombuswhere is that?23:48
sixwheeledbeast~closed23:48
infobot[closed] http://wiki.maemo.org/Why_the_closed_packages or https://wiki.maemo.org/Fremantle_closed_packages, or http://elinux.org/N900, or https://wiki.maemo.org/Free_Maemo23:48
sixwheeledbeastlink 223:48
rhombusok23:49
rhombusnoted23:49
rhombusthanks :)23:49
rhombusgn and until next time23:49
sicelosixwheeledbeast: I;v6, seems sixxs used an ayiya protocol (no idea@exactly what it is), but seems it could even be used over double nat, as on a 3G connection. that sounds great! pity sixxs is no more23:52
sicelos/;v6/Pv6/23:52
sicelomeh23:52
sixwheeledbeastsicelo: Yep I used Sixxs for my tunnel until they closed it down. never looked for another after that.23:54
siceloyou have native IPv6 now, I guess?23:55
sixwheeledbeastI think many sites are hosted in dual stacking server farms for availability. no my ISP bought up the last v4 to avoid it for 10 years23:55
sicelo:P23:57
sicelowhat country?23:57
sixwheeledbeastThey applied to IANA for a massive block to cover there network growth for the next decade uk23:58
sixwheeledbeastthat was 201423:59

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!