LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-31-2017, 06:01 AM   #1
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Rep: Reputation: Disabled
Absolute Begginer


I am as described an absolute beginner. My first question is to ask where to post with my enquiries. I have recently installed what i think is a very basic copy of Unix/Linux to a Plug computer (pogplug) Via Optware, i only managed to do this by winging it with tutorials from all over the place. Now i have more in depth questions and problems so i saw fit to come here for some help/pointers. So where should i post?. Thanks in advance.
 
Old 12-31-2017, 06:22 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,283

Rep: Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031
Welcome here, at LQ!
I think this is the right place to start/ask. If you have several different questions probably better to open more threads, not only one.
 
1 members found this post helpful.
Old 12-31-2017, 06:50 AM   #3
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
I have a couple of drives in the plug and have installed rsync in the hope that I can back up a folder/directory. When I run the rsync command it seems to work as intended so I figured setup a crontab to run this periodically. From here I have no clue, not sure cron is even running.
 
Old 12-31-2017, 07:08 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,283

Rep: Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031
you can use ps -ef | grep cron usually to check if cron was running. But it used to run.
 
Old 12-31-2017, 07:26 AM   #5
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
It appears to be running, had errors until i just used ps, this was the output.
~ # ps | grep cron
16357 root 2872 S grep cron

So if i am right it is running allready?, my next question is how do i shedule a job for it?
 
Old 12-31-2017, 08:09 AM   #6
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,487

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
Quote:
Originally Posted by stigslim View Post
It appears to be running, had errors until i just used ps, this was the output.
~ # ps | grep cron
16357 root 2872 S grep cron

So if i am right it is running allready?, my next question is how do i shedule a job for it?
If that is your only output from that command, it appears that crond is NOT running. That result is only detecting your search "grep cron" rather than a running server process. It should return both.

So, first steps are to make sure that a cron server is installed, and that it is started.
What Linux did you install, exactly? Can you provide pointers to the most significant tutorials that you used?
 
Old 12-31-2017, 08:48 AM   #7
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
Well to begin i'm not really sure what i have installed, i followed a tutorial on a page thats long gone. Cron is listed under installed packages.Allthough i suspect its not started.
# ipkg list_installed
busybox - 1.10.3-1 - A userland replacement for embedded systems.
busybox-base - 1.10.3-1 - A userland replacement for embedded systems.
busybox-links - 1.10.3-1 - A userland replacement for embedded systems.
cron - 4.1-9 - Standard vixie cron, with cron.d addition

Other than that i'm litterally lost, not sure how to check on which i have installed. I have suspisions its not something of a norm.
 
Old 12-31-2017, 10:14 AM   #8
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,283

Rep: Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031
Code:
uname -a
cat /etc/*issue*
these are two commands which will give you information about what's installed.
 
1 members found this post helpful.
Old 12-31-2017, 10:44 AM   #9
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
Gave them a go and this was the output

# uname -a
Linux PogoplugPro 2.6.31.6_SMP_820 #96 SMP Tue Feb 8 10:06:27 PST 2011 armv6l unknown
~ # cat /etc/*issue*
cat: can't open '/etc/*issue*': No such file or directory

Had look through my bookmarks and this is as close as it gets.

http://www.nslu2-linux.org/wiki/pmwi...=Main/HomePage

Any ideas on how to get cron running?.
 
Old 12-31-2017, 10:57 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,283

Rep: Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031
looks like debian based. But probably I missed something. Here is a link you can check: http://www.nslu2-linux.org/wiki/pmwi...rontabProblems
Probably you only need to add a crontab entry, it does not run because nothing to do. You can check the boot log, probably you can find something related.
 
1 members found this post helpful.
Old 12-31-2017, 01:03 PM   #11
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
Gave it a go by adding this to the crontab.


SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/sbin:/opt/bin
MAILTO=""
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #

0 2 * * * /rsync -av --delete /tmp/.cemnt/mnt_sdb1/Backup /tmp/.cemnt/mnt_sdc1/


Checked Var/Log afterwards for messages but nothing in there. Does that cron job look like it should work?.

Last edited by stigslim; 01-01-2018 at 07:07 AM.
 
Old 01-01-2018, 06:07 PM   #12
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
Still no luck, the only other thing i can see is enviroment settings not matching but not sure how to change them or is i should. This is at the top of the cron job.

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/sbin:/opt/bin
MAILTO=""
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #

0 2 * * * /rsync -av --delete /tmp/.cemnt/mnt_sdb1/Backup /tmp/.cemnt/mnt_sdc1/


This whats listed under env

USER=root
OLDPWD=/root
HOME=/root
LOGNAME=root
TERM=xterm-256color
PATH=/opt/bin:/opt/sbin:/usr/bin:/usr/sbin:/bin:/sbin
SHELL=/bin/sh
PWD=/opt/etc

Does it look okay or should i try and change the Path?, if so how is it done?.
 
Old 01-02-2018, 06:01 AM   #13
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,487

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
I see nothing wrong with what you have in crontab. The path contains enough, just in a different order. I am confused by the change in home, why you would want it "/" under cront when it is "/root" during your interactive sessions.

I believe the next key is to find out how to start crond. I would start by detemining what init you have (systemd, sysv/init, etc.). Do you see the /etc/rc.d structure? Are there rc* files under /etc?
 
Old 01-02-2018, 10:26 AM   #14
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,283

Rep: Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031Reputation: 3031
/rsync is definitely wrong in your crontab. That should be /usr/bin/rsync or something similar
 
Old 01-02-2018, 03:16 PM   #15
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
The rsync command runs when entered in to the command line, so does that tell me its correct?. To offer some clarity i have Optware/Linux installed and running from a USB drive in the back of the plug (which is where rsync has to run from i take it) So i'm not sure the structure is as it should be.The output from /opt/etc is as follows.

opt/etc # ls
cron.d ipkg.conf rsyncd.conf vsftpd.chroot_list xinetd.conf
crontab man.conf rsyncd.secrets vsftpd.chroot_list.save xinetd.d
default mediatomb samba vsftpd.conf
init.d nanorc transmission-daemon wgetrc

If i list /etc straight from the prompt i get this.

Wireless fstab inittab passwd profilecp shadow-
cefs.conf group mtab passwd- resolv.conf shells
dropbear init.d nsswitch.conf profile shadow
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
advice for a begginer ApacheOmega Red Hat 21 04-12-2015 10:30 AM
please help me IM BEGGINER IN LINUX.. gkarthik078 Linux - Kernel 6 06-29-2011 04:08 AM
LXer: Absolute Linux is an absolute winner LXer Syndicated Linux News 0 08-07-2007 07:32 PM
Perl Begginer Cool_Hand_Luke Programming 6 03-11-2005 05:34 PM
For begginer,where can I start NoThing Linux - General 1 08-03-2004 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration