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