Koozali.org: home of the SME Server

How to monitor ibays for changes

Offline Tim_H

  • *
  • 5
  • +0/-0
How to monitor ibays for changes
« on: July 11, 2008, 02:29:56 PM »
Hello

I'm a new user to SME Server. It was recommended to me and is superb. It gives me a lot of tools for a local school that otherwise I'd have to pay a great deal for. I think I will ask the school to make a dontation!

I have a question about ibays. I hope someone can help?

I do not know how to write code in the linux environment (thats why I like SME Server so much!) so I wonder if anyone can tell me how to monitor an ibay for changes.

The background is that our 12 year olds are given ICT assignments and one is to build a simple website. Each child has an ibay for this pupose and uploads his or her website when they have made changes. This will be an ongoing project for the next few weeks and over the summer break as part of a summer school. The sites are not public and are for local learning and enjoyment only.

With up to 40 ibays to keep an eye on, I wonder if it would be possible to have an automatic scheduled task that SME server runs every day that will email me when any of the ibays content have changed. I would not need to know what the changes are, only that chnages have been made. I can do the rest.

This will save me time looking if a child "has" done new work (which could be simple or signifgicant changes) and I can keep an eye open to help those who have made changes.

Is this possible? I read an Apache book which talks about cron tasks but have no idea how to get the server to look at the ibays in question and look for changes since the last inspection.

Can this be done and can anyone help me please? I'd be so grateful if anyone can.

Thanks in advance and again - thanks for a great product!!

Tim Harding

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How to monitor ibays for changes
« Reply #1 on: July 11, 2008, 05:36:17 PM »
May I ask why you want to know if there are modification? Is that for backup purposes? As comparing a list of files against a previously backup-ed list would be a basic function for the backup software and not for the sysadmin as far as I am concerned.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Tim_H

  • *
  • 5
  • +0/-0
Re: How to monitor ibays for changes
« Reply #2 on: July 11, 2008, 05:56:35 PM »
Hello cactus

Thank you for your reply, but you seem to be off the track a little. Maybe I wasn't being clear about the idea?

If a pupil makes an edit to a webpage in, or adds/deletes a new file from an ibay I want to know by email. A backup would need to be trawled for changes and I just don't have the time to do that with the potential for many pupils doing several changes each day.

So no, this is not for backup purposes, it is for email-notification purposes, once or even twice a day. I have read some more and I understand that cron 'jobs' can be set to run at set times of day (every hour would be great) so I would get an email notification of changes in that previous hour. That would be terrific but backup would not help me there.

Looking at the contribs.org site, maybe I ought to ask for a "contrib" to do this rather than a modification as I doubt many would want to do what I would like to do in the main SME 7.3 software!

Thanks

Tim

Offline Tim_H

  • *
  • 5
  • +0/-0
Re: How to monitor ibays for changes
« Reply #3 on: July 11, 2008, 06:00:42 PM »
I have moved this question over to the 7.x Contribs forum.

http://forums.contribs.org/index.php?topic=41571

Sorry if I posted it in the wrong place!

Tim

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How to monitor ibays for changes
« Reply #4 on: July 11, 2008, 06:03:29 PM »
So no, this is not for backup purposes, it is for email-notification purposes, once or even twice a day. I have read some more and I understand that cron 'jobs' can be set to run at set times of day (every hour would be great) so I would get an email notification of changes in that previous hour. That would be terrific but backup would not help me there.
I still think it is strange that you need to be noticed on a regular basis to changes on your file system, but if you really need to you could make a directory list every hour and write that to file. The next run you make a new list and compare those to each other using the diff command for instance, it is not that hard to write.

Looking at the contribs.org site, maybe I ought to ask for a "contrib" to do this rather than a modification as I doubt many would want to do what I would like to do in the main SME 7.3 software!
I doubt that as I have never seen the request before...
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How to monitor ibays for changes
« Reply #5 on: July 11, 2008, 06:04:54 PM »
I have moved this question over to the 7.x Contribs forum.

http://forums.contribs.org/index.php?topic=41571

Sorry if I posted it in the wrong place!

Tim
You might have posted in the wrong place, but now we have two threads... best option was to contact a moderator and have it moved to the proper forums. If one of the mods is watching, please move this post the the proper category and lock the newly opened topic (link to that is above).
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Tim_H

  • *
  • 5
  • +0/-0
Re: How to monitor ibays for changes
« Reply #6 on: July 11, 2008, 06:07:09 PM »
Thanks Cactus -

I bet you hate newbies!  :-?

Tim

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How to monitor ibays for changes
« Reply #7 on: July 11, 2008, 06:09:47 PM »
I bet you hate newbies!  :-?
Nope, I once was one as well... I wish that newbies... ah nevermind :-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How to monitor ibays for changes
« Reply #8 on: July 11, 2008, 06:25:03 PM »
So no, this is not for backup purposes, it is for email-notification purposes, once or even twice a day. I have read some more and I understand that cron 'jobs' can be set to run at set times of day (every hour would be great) so I would get an email notification of changes in that previous hour. That would be terrific but backup would not help me there.
Something like this pasted in a file in /etc/cron.d should send a e-mail every hour to the admin address with a file list of changes:
Code: [Select]
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=admin
* */1 * * * root mv -f /tmp/dirlist.curr /tmp/dirlist.prev; for f in `find /home/e-smith/files/ibays/ -type f`; do ls $f; done > /tmp/dirlist.curr; diff -u /tmp/dirlist.prev /tmp/dirlist.curr
« Last Edit: July 11, 2008, 06:32:21 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Tim_H

  • *
  • 5
  • +0/-0
Re: How to monitor ibays for changes
« Reply #9 on: July 11, 2008, 06:30:31 PM »
Thanks Cactus - more than I expected.

I'll give it a try and report back!

Tim  :-P

Offline byte

  • *
  • 2,183
  • +2/-0
Re: How to monitor ibays for changes
« Reply #10 on: July 11, 2008, 07:30:43 PM »
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!