**** BEGIN LOGGING AT Wed Oct 17 03:00:00 2018 Oct 17 04:31:40 Low 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 copy Oct 17 04:31:40 and 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. Oct 17 04:43:10 Just make sure Google Sheets does not take over your computer ;-) Oct 17 04:44:45 Oksana: Care to explain? I do not try to use Google Sheets on the N900 with only 256 MiB of main memory. :-P Oct 17 05:24:19 As in, if Google Sheets can execute command in a shell on a server, then Google Sheets could potentially take over the computer? Oct 17 05:34:05 using spreadsheet instead scripting+db to get automated data gathered seems like something done by someone completely computer illiterate Oct 17 05:36:48 'oh, hey, just run this vbs in your excel, dont worrry, it's a completely safe and harmless' Oct 17 05:39:09 Oksana: 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. Oct 17 05:41:04 I 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. Oct 17 05:41:18 why not cacti? Oct 17 05:42:07 KotCzarny: cacti? Oct 17 05:42:22 data monitoring software Oct 17 05:42:41 with big flexibility and plenty of features Oct 17 05:43:48 Actually, I think we are already using NewRelic on at least some servers; maybe that is relevant here? Oct 17 05:45:02 might be, if it does similar thing, dont rewrite the wheel Oct 17 05:45:34 I do not use BSD so I do not use wheel. ;-) Oct 17 05:46:17 monitoring software usually use snmp to gather standard data instead of running random things Oct 17 05:46:59 df is standard in *nix, not a random thing. Oct 17 05:48:39 snmpd can be made to run random things on request :) Oct 17 20:34:19 I keep losing data on my N900 when I mount the device Oct 17 20:34:29 as USB mass storage Oct 17 20:34:45 and I thought I was doing everything properly Oct 17 20:35:05 'losing data' - how? Oct 17 20:35:25 sicelo: I write notes using the Notes app Oct 17 20:35:42 sicelo: I try to remember to save regularly Oct 17 20:35:52 sicelo: but sometimes I just close the app Oct 17 20:36:10 sicelo: normally, when I open it again, I see all my recent entries Oct 17 20:36:46 but even if I close everything, attach the device, mount it as mass storage... Oct 17 20:36:53 1. I don't see the most recent version Oct 17 20:37:19 and 2. when I unmount it and try and look at the notes file again, I get a message saying the file could not be restored Oct 17 20:37:30 I just lost another day's worth of notes :( Oct 17 20:38:31 Is there any way for me to recover this data? Oct 17 20:39:24 no idea. that has never happened to me. i close the application without ever saving, and have never lost anything. Oct 17 20:39:43 maybe you should consider a different application, e.g. Xournal? Oct 17 20:40:39 sicelo: are you routinely mounting the N900 as a USB mass storage device, or do you move everything over the network? Oct 17 20:41:10 I recall someone mentioning -- perhaps Jörg -- that you have to be very careful here or you can damage files Oct 17 20:41:46 i 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 do Oct 17 20:41:59 hmmm Oct 17 20:42:23 sicelo: where are the files stored? I have a directory called .documents, but that seems to contain old versions of the files Oct 17 20:43:02 Notes seems to save in the last directory you opened something from. Oct 17 20:43:34 not in some default? Oct 17 20:43:54 no Oct 17 20:44:06 you can see the current save directory like so: Oct 17 20:45:01 but Notes saves backup files somewhere, and those must be automatic... Oct 17 20:45:09 gconftool-2 -g /apps/osso/osso-notes/default_folder Oct 17 20:47:12 i 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 wrong Oct 17 20:47:22 Ok -- so clearly is something wrong here Oct 17 20:47:27 *there Oct 17 20:47:38 Notes is saving in a hidden directory -- is that normal? Oct 17 20:47:42 .documents Oct 17 20:47:50 yes. normal Oct 17 20:48:16 it is what you see as MyDocs/Documents in File Manager :) Oct 17 20:48:38 and since you mount it to USB a lot, you would have notice. what is the host OS? Oct 17 20:48:56 But in Filemanager there is no MyDocs Oct 17 20:48:59 just Documents Oct 17 20:49:03 and it contains different files Oct 17 20:49:16 Just now it was Windows Oct 17 20:49:20 but it has happened with Linux also Oct 17 20:50:20 ok. scratch out MyDocs. N900/Documents in File Manager Oct 17 20:51:07 do you mean Nokia N900? Oct 17 20:51:11 i 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 Joerg Oct 17 20:51:39 sicelo: I thought that's why he warned me to close everything before mounting via USB Oct 17 20:51:46 which is what I just did Oct 17 20:52:02 but then I couldn't find the most current state of the file on the host machine Oct 17 20:52:25 and when I unmounted and tried to open it again with Notes, it gave me an error message saying the restore had failed Oct 17 20:52:35 something can't be right here Oct 17 20:52:44 if 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 situation Oct 17 20:53:10 sicelo: I have the following files Oct 17 20:54:27 here's a page you might want to get familiar with: https://wiki.maemo.org/N900_filesystem Oct 17 20:55:13 and, https://wiki.maemo.org/MyDocs_folder Oct 17 20:56:15 thanks Oct 17 20:58:47 can I change the default folder with gconftool-2? Oct 17 20:59:26 i don't know how Notes will like that. you could try. Oct 17 21:00:10 i don't think you really need to, though Oct 17 21:00:32 just choosing a save directory from within notes should set it Oct 17 21:01:37 ok Oct 17 21:01:53 I wonder how this happened in the first place Oct 17 21:02:23 what? Oct 17 21:03:26 well, that I have files that used to be in .documents that are now in documents Oct 17 21:03:48 and that I keep losing my most recent changes when I do mounts, even though everything is ostensibly closed Oct 17 21:04:37 if you check the links I gave you, you would notice that MyDocs/.documents = "Nokia N900/Documents" Oct 17 21:04:54 yeah, but I also have Nokia N900/documents Oct 17 21:05:09 you created it? Oct 17 21:05:34 probably, but I don't recall Oct 17 21:06:02 Notes does not seem to have a Save As function Oct 17 21:06:24 yup Oct 17 21:06:42 sicelo: so how am I supposed to change the default directory? Oct 17 21:06:57 New Document - Save :) Oct 17 21:07:48 but remember, default directory is not fixed .. it keeps getting set to wherever you last open a document from Oct 17 21:08:38 i do think *you* need a better Notes application. Check the repositories for something you like Oct 17 21:09:49 i 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 others Oct 17 21:10:08 sicelo: 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) Oct 17 21:10:18 ok, xournal Oct 17 21:10:35 could the backups be in one of the .osso directories? Oct 17 21:11:01 you can try lsof to see what files Notes keeps open (sorry can't help much with that ...) Oct 17 21:11:09 there's a file here called "startup-restored-flag" Oct 17 21:11:49 aha Oct 17 21:11:56 there's also Oct 17 21:12:14 ~/.osso/osso-notes Oct 17 21:13:45 nice then Oct 17 21:14:23 which contains autosave.0-Espanol.note.html.note.html (which is for an old file I don't think I have anymore) Oct 17 21:14:26 unfortunately Oct 17 21:14:33 the data I am looking for is not there Oct 17 21:14:41 then there is .permanent-state Oct 17 21:15:18 which has a bunch of file URIs to an autosave of a file I just had open Oct 17 21:15:42 very wierd Oct 17 21:15:53 I guess I'll try switching to xournal Oct 17 21:16:34 doesn't have to be xournal. check repositories for somethingt hat'll suit you. Oct 17 21:20:06 seems there's a qmlnotes Oct 17 21:20:51 might be worth a try Oct 17 21:22:49 ok Oct 17 21:25:12 ok, I've started by changing the default save folder Oct 17 21:25:27 but you are right, notes is a pain Oct 17 21:25:30 it's buggy Oct 17 21:26:02 many f the osso* applications are Oct 17 21:26:06 *of Oct 17 21:26:18 (when I save rich text files with bullet points, it adds an additional bullet point with each save operation) Oct 17 21:26:35 maybe that explains the restore failures also Oct 17 21:35:36 rhombus: osso-notes is weird. IIRC it saves files in XML format Oct 17 21:35:55 sixwheeledbeast: exactly! Oct 17 21:35:57 I mostly use leafpad Oct 17 21:36:24 sixwheeledbeast: I've just installed "Notes" and "mnotes" Oct 17 21:36:34 and now I will install leafpad :) Oct 17 21:37:41 sixwheeledbeast: but yeah, osso-notes has a bug where it keeps nesting bullet list items Oct 17 21:39:04 xml is notoriously difficult to do correctly Oct 17 21:39:44 which is why I can't understand why it is such a popular format Oct 17 21:41:38 Validation Oct 17 21:42:57 Anyway I found osso-notes annoying to use within months of having my N900 and switched to leafpad for GUI text editing Oct 17 21:43:13 sixwheeledbeast: yeah, I should have switched sooner Oct 17 21:43:15 :/ Oct 17 21:43:19 inertia, I guess Oct 17 21:43:54 now that I've lost hours of notes twice in the last two weeks, I'm done with it Oct 17 21:44:08 thanks for the tips sicelo, sixwheeledbeast Oct 17 21:44:16 I'm going to hit the sack Oct 17 21:44:17 yw Oct 17 21:44:20 I can only think to look in .osso Oct 17 21:44:31 sixwheeledbeast: for the possible backups? Oct 17 21:44:45 yer Oct 17 21:44:50 yeah, there were some old autosave files there, unfortunately no sign of my data :( Oct 17 21:45:17 tmp? Oct 17 21:45:22 hmm Oct 17 21:45:57 Run some sort of grep on text files? Oct 17 21:46:14 Just throwing ideas Oct 17 21:47:10 sixwheeledbeast: thanks, those are good ideas Oct 17 21:47:16 I'll give them a try tomorrow Oct 17 21:47:28 thanks again Oct 17 21:47:33 Its a closed program so you can't work it out from the source where backups would be Oct 17 21:47:36 np Oct 17 21:47:51 all the more reason NOT to use it Oct 17 21:47:53 :) Oct 17 21:48:03 g'night Oct 17 21:48:03 leafpad is on the Free Maemo wiki ;) Oct 17 21:48:06 gn Oct 17 21:48:13 as replacement Oct 17 21:48:22 where is that? Oct 17 21:48:35 ~closed Oct 17 21:48:35 [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_Maemo Oct 17 21:48:45 link 2 Oct 17 21:49:41 ok Oct 17 21:49:42 noted Oct 17 21:49:46 thanks :) Oct 17 21:49:55 gn and until next time Oct 17 21:52:04 sixwheeledbeast: 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 more Oct 17 21:52:24 s/;v6/Pv6/ Oct 17 21:52:32 meh Oct 17 21:54:41 sicelo: Yep I used Sixxs for my tunnel until they closed it down. never looked for another after that. Oct 17 21:55:11 you have native IPv6 now, I guess? Oct 17 21:55:52 I 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 years Oct 17 21:57:15 :P Oct 17 21:57:37 what country? Oct 17 21:58:56 They applied to IANA for a massive block to cover there network growth for the next decade uk Oct 17 21:59:15 that was 2014 Oct 17 22:00:25 we still have quite number of v4 this side too, to the point that neighboring South Africa, for example, has at least two mobile operators who give public IP to cellular phones :P Oct 17 22:01:17 recently they NAt everyone, but you can request 'unrestricted apn' for free and very easily Oct 17 22:04:52 Many mobile cos here use CGN, it creates massive headaches for some applications. Oct 17 22:05:55 It's becoming popular for ISP's tho to, as mobile co's become ISP's too. Oct 18 01:57:59 (notes being lost) Maybe this is why Android switched from using USB Mass Storage to MTP? Can Maemo use MTP instead of USB Mass Storage? Oct 18 02:09:01 I imagine the reason why something like Android would use MTP would be because sharing a storage device requires change in ownership. Oct 18 02:09:36 your PC can't have access to the filesystem at the same time as your phone, so your phone has to unmount it before it can be shared. Oct 18 02:11:26 You don't have that problem if you use a protocol for accessing files (like MTP, smb, NFS, FUSE, 9P/Styx) instead of accessing blocks on a storage device. Oct 18 02:12:06 and out of the ones I listen, MTP is pretty much the only one that will just work with the way people normally use USB, since the others are network protocols. Oct 18 02:13:47 I can't remember exactly how Maemo handled this stuff, but iirc it was not correct, so you could easily end up with a corrupt filesystem due to multiple systems reading/writing to it. Oct 18 02:14:26 Yes, I know that. MTP is definitely distinguishable from USB Mass Storage in my experience, though. At least on Windows. Oct 18 02:14:33 * Maxdamantus would never use UMS mode on his actual partitions without explicitly unmounting. **** ENDING LOGGING AT Thu Oct 18 03:00:00 2018