tdr112 | morning all | 09:59 |
---|---|---|
tdr112 | how would one find the ful path to a command eg touch | 10:00 |
ebel | which | 10:02 |
ebel | or type | 10:02 |
ebel | actually "type $COMMANDNAME" is better because it works on shell bultins etc. | 10:03 |
ebel | "which" will return just the path so it's handy if you want to use it in scripts | 10:03 |
ebel | e.g. "ls -l $(which vim)" will tell you the size & perms etc of the vim command | 10:04 |
ebel | Can also be used to tell you the deb package that a programme is in: | 10:05 |
ebel | dpkg -S $(which pv) | 10:05 |
ebel | This is Unix, you should know this. | 10:05 |
ebel | </jurassic-park> | 10:07 |
tdr112 | thanks ebel | 10:15 |
tdr112 | hey guys whats the best way to debug a cron job | 10:29 |
slashtommy | stdout and stderr from a cron job should be sent to root's mailbox by default | 10:34 |
slashtommy | or whichever user is setup as a the alias for root (/etc/aliases) | 10:35 |
ebel | or put the output (stdout & atderr) to a file and look at it | 10:45 |
ebel | You can use "env" command to print the current environment variables. | 10:45 |
ebel | and look in the log file, where it starts the cron, you can see if the cron is running or not | 10:46 |
tdr112 | i have pit stdout and err to a file and getting stuff now | 10:46 |
ebel | environmental variables & PATHs & user account are usually the things that mess up crons | 10:46 |
tdr112 | i think i have fixed it | 10:47 |
tdr112 | ebel: that what it was forgot to change to the pull path for one of them | 10:47 |
ebel | ah full paths | 10:55 |
ebel | in python you can standardise paths with os.path.abspath() | 10:55 |
ebel | You can do it on the command line with `realpath` | 10:55 |
ebel | tis always good to sanitise input data from the user ASAP | 10:56 |
davem | don't forget file permissions, chances are cron isn't running as your user/the user you think | 11:05 |
tdr112 | ok cron is runn when i tell it do */5 for every 5 min but not when i set a time | 11:35 |
tdr112 | could the cron user be using a different time setting | 11:35 |
ebel | that question doesn't make sens | 11:37 |
ebel | what "time string" are you using? | 11:38 |
ebel | AFAIK cron is run as root, it just can run certain lines as a a different user | 11:38 |
ebel | Only root is God. Only root can change to a different user. Sometimes root will, through the power of sudo & setuids, allow other users to change to other user accounts, but they do that by becoming one with root, then moving to another user | 11:41 |
ebel | amen | 11:41 |
tdr112 | i am running it as root | 11:42 |
tdr112 | so if i set the cron job to run every 5 min using the following */5 * * * * ls | 11:43 |
tdr112 | it runs | 11:43 |
tdr112 | but not 45 11 * * * ls | 11:43 |
slashtommy | it's not 11.45 yet | 11:43 |
tdr112 | yep | 11:44 |
tdr112 | that was just an eg | 11:44 |
slashtommy | 45 11 * * * root /bin/ls | 11:44 |
ebel | 'root' might not be needed. depends if you're using "crontab -e". /etc/crontab, etc. | 11:45 |
tdr112 | i am using sudo crontab -e | 11:45 |
ebel | "root" is not needed then | 11:45 |
* ebel is unsure, that line looks ok... | 11:46 | |
tdr112 | ok found it | 12:01 |
tdr112 | timezone | 12:01 |
tdr112 | its always time zones | 12:01 |
tdr112 | root had a different time zone set than my user | 12:01 |
tdr112 | thank you all for you help | 12:01 |
ebel | hahah | 12:06 |
ebel | always always use UTC | 12:06 |
ebel | i don't really know much of changing server's timezones, I didn't think different users had different timezones. | 12:06 |
ebel | thought it was all the one server time | 12:06 |
ebel | tdr112: use ntp to keep your clocks up to day | 12:06 |
ebel | *date | 12:06 |
dumb1224 | Hi I recently noticed that turning on 'smooth scrolling' on firefox is not much better | 13:27 |
dumb1224 | is such a feature implemented in firefox or gtk+ and so on? | 13:28 |
Chat3619 | Hi room | 16:09 |
ebel | hello Chat3619 | 16:10 |
slashtommy | hey BenChapman | 16:37 |
BenChapman | Hey slashtommy :) | 16:45 |
=== delcoyote_ is now known as delcoyote | ||
slashtommy | BenChapman: how you finding life in town? | 17:08 |
tdr112 | has anyone setup a vpn server on ubuntu | 17:16 |
slashtommy | what kind of VPN? | 17:20 |
tdr112 | i am not too sure | 17:23 |
tdr112 | just been told me need one asap for a 3rd party | 17:23 |
slashtommy | what equipment are you supporting? | 17:23 |
tdr112 | just reading up on them now , finding out do a need a router or is it some thing i do on a server | 17:24 |
slashtommy | a server can be a router | 17:24 |
slashtommy | and in fact, making it a VPN server - you usually add a tun or tap interface, thereby making your server multihomed, therefore making it into a router | 17:25 |
tdr112 | hmm, it sounds hard | 17:27 |
slashtommy | openvpn is pretty easy to setup, a couple of hours | 17:28 |
slashtommy | it uses key based authentication, so very convenient if you're connecting devices (rather than people with their laptops) | 17:29 |
slashtommy | if you're wanting to provide a VPN for remote workers, you may be better off with buying an off-the-shelf router to do that | 17:29 |
slashtommy | the cost would be much cheaper than your time | 17:30 |
slashtommy | anyway, it's home time | 17:30 |
BenChapman | slashtommy: great :) Really enjoying being central | 17:54 |
BenChapman | no major issues with noise as-yet... but I wasn't there saturday night | 17:54 |
czajkowski | http://www.youtube.com/watch?v=ZKBpYwuk1Uw | 18:59 |
slashtommy | czajkowski: what's the story? | 19:16 |
czajkowski | as of now I'm coming | 19:16 |
czajkowski | but that may change on thursday | 19:16 |
czajkowski | sorry I cant confirm either way | 19:16 |
slashtommy | oh | 19:17 |
slashtommy | we can plan for friday night :) | 19:18 |
slashtommy | or rather, what's the plan? | 19:18 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!