Hi all,
I stock events in a dedicated partition, different from the partition where
zm is installed.
Making proper links to allow zm find the events, all works (see previous post) but one thing:
-- zmDiskPercent always gets used space from the partition where zm
-- is installed(!)
Purgewhenfull cannot work in my situation:
/dev/hda1 37% used (zm partition)
/videosurvey 70% used (event partition)
if I specify a diskpercent < 37 then PurgeWhenFull gets /videosurvey
to 0 bytes
if I specify a diskpercent > 37 then PurgeWhenFull lets /videosurvey
grow to 100%
Is there any chance to affect the way zmDiskPercent works, or any
workaround on this ?
Thank you very much
Roberto
zmDiskPercent is checking the wrong disk !!
-
- Posts: 48
- Joined: Tue Mar 21, 2006 1:37 pm
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
-
- Posts: 48
- Joined: Tue Mar 21, 2006 1:37 pm
Phil, Thanks for your replay
> Even with links it should check the right disk. How have you got it set up?
> Do you have the 'events' dir linked to your second disk?[/quote]
This is my situation:
(only relevant partitions are listed)
/dev/hda3 28G 9,7G 17G 37% /var
(zm is in /var/www/zm)
/dev/hdb2 37G 8,4G 27G 25% /videosurvey
(events are recorded in /videosurvey/events)
I made an alias in apache to get /videosurvey like it was in the web space.
Then I made a soft link in /var/www/zm to /videosurvey: this link
is needed for
zmvideo.pl to find events and correctly generate videos
(zmvideo.pl searches for events in (I guess):
my $event_path = ZM_PATH_WEB.'/'.ZM_DIR_EVENTS.'/'.(omissis)
If I 'm correct zmfilter.pl try to delete events from ZM_DIR_EVENTS
directly (maybe the link in /var/www/zm to /videosurvey is not needed
by zmfilter.pl):
my $command = "rm -rf ".ZM_DIR_EVENTS.(omissis)
I cannot find how zmDiskPerCent works, but I'm sure it gets "disk usage %" from /dev/hda3. If I set diskpercent < 37 ALL events are deleted.
If I set diskpercent > 37 events are NEVER deleted.
You can eventually see the zm log files in
www.occhiostanco.com/zmlogs
Thank you again, Phil..
Roberto
[Edit by Cordel: I removed the login info and forwarded it to Phil, You really don't want to give out logins for any Admin access to your machine publicly]
> Even with links it should check the right disk. How have you got it set up?
> Do you have the 'events' dir linked to your second disk?[/quote]
This is my situation:
(only relevant partitions are listed)
/dev/hda3 28G 9,7G 17G 37% /var
(zm is in /var/www/zm)
/dev/hdb2 37G 8,4G 27G 25% /videosurvey
(events are recorded in /videosurvey/events)
I made an alias in apache to get /videosurvey like it was in the web space.
Then I made a soft link in /var/www/zm to /videosurvey: this link
is needed for
zmvideo.pl to find events and correctly generate videos
(zmvideo.pl searches for events in (I guess):
my $event_path = ZM_PATH_WEB.'/'.ZM_DIR_EVENTS.'/'.(omissis)
If I 'm correct zmfilter.pl try to delete events from ZM_DIR_EVENTS
directly (maybe the link in /var/www/zm to /videosurvey is not needed
by zmfilter.pl):
my $command = "rm -rf ".ZM_DIR_EVENTS.(omissis)
I cannot find how zmDiskPerCent works, but I'm sure it gets "disk usage %" from /dev/hda3. If I set diskpercent < 37 ALL events are deleted.
If I set diskpercent > 37 events are NEVER deleted.
You can eventually see the zm log files in
www.occhiostanco.com/zmlogs
Thank you again, Phil..
Roberto
[Edit by Cordel: I removed the login info and forwarded it to Phil, You really don't want to give out logins for any Admin access to your machine publicly]
You entry for zm in apache should be one of two things. Either for options to allow followsymlinks or to add as you have done. So That part is good.
Next you should have symlinks from:
/var/www/zm/events -> /videosurvey/events
and any other directories you may have moved.
/var/www/zm/images -> /videosurvey/images etc.
So that should be fine.
I don't understand what you mean by:
If so, then as you have zm configured this would come out to /var/www/htdocs/zm//videosurvey/events = $event_path unless thats what you are seeing in the code somewhere (in which case what file/s and line number/s). If thats the case then you would need to set the event path for ZM_DIR_EVENTS back to events and let the symlink direct df and the filters.
The df command uses ZM_DIR_EVENTS to to get the location of where your events are stored and returns that value.
Next you should have symlinks from:
/var/www/zm/events -> /videosurvey/events
and any other directories you may have moved.
/var/www/zm/images -> /videosurvey/images etc.
So that should be fine.
I don't understand what you mean by:
Did you edit/add something to load the varable with the variables from zm?my $event_path = ZM_PATH_WEB.'/'.ZM_DIR_EVENTS.'/'.(omissis)
If so, then as you have zm configured this would come out to /var/www/htdocs/zm//videosurvey/events = $event_path unless thats what you are seeing in the code somewhere (in which case what file/s and line number/s). If thats the case then you would need to set the event path for ZM_DIR_EVENTS back to events and let the symlink direct df and the filters.
The df command uses ZM_DIR_EVENTS to to get the location of where your events are stored and returns that value.
-
- Posts: 48
- Joined: Tue Mar 21, 2006 1:37 pm
Thanks Cordel
> Next you should have symlinks from:
> /var/www/zm/events -> /videosurvey/events
> and any other directories you may have
> /var/www/zm/images -> /videosurvey/images etc.
I made all those links and, at a very first look, filters are getting usage% from the
right partition, now.
I will better verify in the next days when /videosurvey increase its size.
Thanks very much
Roberto
> Next you should have symlinks from:
> /var/www/zm/events -> /videosurvey/events
> and any other directories you may have
> /var/www/zm/images -> /videosurvey/images etc.
I made all those links and, at a very first look, filters are getting usage% from the
right partition, now.
I will better verify in the next days when /videosurvey increase its size.
Thanks very much
Roberto