Re: HOWTO monitor changes in installed packages within jails?
On 20.07.2013, at 18:34, Michael Grimm wrote: > On 20.07.2013, at 14:53, Matthew Seaman > wrote: >> On 20/07/2013 12:09, Michael Grimm wrote: > >>> I did migrate to pkgng some month ago, and ever since I am curious >>> how to monitor changes in installed packages within jails. I am >>> looking for a functionality/port that works like 490.status- >>> pkg-changes for my host. >>> >>> Question: is there any functionality within the periodic system or a >>> port that I might have missed to find? >> >> You can't just run 490.status-pkg-changes directly in your jail? > > Yes, I can ;-) > > But! I do have a lot of service jails running at my host, thus I would like > to omit modifying every jail's /etc/periodic.conf adding: > > | daily_status_pkg_changes_enable="YES"# Show package changes > | pkg_info="pkg info" # Use this program > > >> Try this patch: > > Thanks for that approach, namely adding "pkg -j jailname info" for every jail > running. Due to my amount of jails I might need to add some looping over "jls > -N" output instead of adding a lot of $daily_status_pkg_changes_flags. > > I was hoping that I could omit programming that functionality myself, but I > might need to do so. I ended up in adding: --- snip --- /usr/src/etc/periodic/daily/490.status-pkg-changes 2013-04-03 17:59:35.894705550 +0200 +++ /etc/periodic/daily/490.status-pkg-changes 2013-07-23 20:19:27.833641916 +0200 @@ -32,6 +32,24 @@ diff -U 0 $bak/pkg_info.bak2 $bak/pkg_info.bak \ | grep '^[-+][^-+]' | sort -k 1.2 fi + +# added jail(s) support +# + for jname in `jls -N | grep -v JID | awk '{print $1}'`; do + if [ -f $bak/pkg_info_${jname}.bak ]; then + mv -f $bak/pkg_info_${jname}.bak $bak/pkg_info_${jname}.bak2 + fi + jexec ${jname} ${pkg_info:-/usr/sbin/pkg_info} > $bak/pkg_info_${jname}.bak + + cmp -sz $bak/pkg_info_${jname}.bak $bak/pkg_info_${jname}.bak2 + if [ $? -eq 1 ]; then + echo "" + echo "Changes in installed packages (jail ${jname}):" + diff -U 0 $bak/pkg_info_${jname}.bak2 $bak/pkg_info_${jname}.bak \ + | grep '^[-+][^-+]' | sort -k 1.2 + fi + done + fi ;; --- snip Not perfect, really, but working at my side. Michael ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: HOWTO monitor changes in installed packages within jails?
On 20.07.2013, at 14:53, Matthew Seaman wrote: > On 20/07/2013 12:09, Michael Grimm wrote: >> I did migrate to pkgng some month ago, and ever since I am curious >> how to monitor changes in installed packages within jails. I am >> looking for a functionality/port that works like 490.status- >> pkg-changes for my host. >> >> Question: is there any functionality within the periodic system or a >> port that I might have missed to find? > > You can't just run 490.status-pkg-changes directly in your jail? Yes, I can ;-) But! I do have a lot of service jails running at my host, thus I would like to omit modifying every jail's /etc/periodic.conf adding: | daily_status_pkg_changes_enable="YES"# Show package changes | pkg_info="pkg info" # Use this program > Try this patch: Thanks for that approach, namely adding "pkg -j jailname info" for every jail running. Due to my amount of jails I might need to add some looping over "jls -N" output instead of adding a lot of $daily_status_pkg_changes_flags. I was hoping that I could omit programming that functionality myself, but I might need to do so. Thanks for your input and with kind regards, Michael ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
HOWTO monitor changes in installed packages within jails?
Hi -- I did migrate to pkgng some month ago, and ever since I am curious how to monitor changes in installed packages within jails. I am looking for a functionality/port that works like 490.status-pkg-changes for my host. Question: is there any functionality within the periodic system or a port that I might have missed to find? Thanks in advance and with kind regards, Michael ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: dovecot/jail question
Sam Fourman Jr. wrote: > On Tue, Jan 19, 2010 at 4:18 PM, Jim wrote: >> First, Thanks all for the help with my previous "sendmail" question. >> I rebuilt the jail without postfix and that at least seems happy. > > So does this mean that you can NOT run postfix in a FreeBSD 8 Jail? > > I didn't know this, I just assumed postfix in a Jail would work. if > possible could someone confirm this? I can confirm that Postfix, Dovecot, and Squirrelmail do run in jails, and I do assume that almost every mailing system will do as well. Regards, Michael -- to let ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
gmirror+gjournal: spontaneous reboots on "excessive" disk access
Hi -- I'm running a gmirror raid1 plus gjournal for a year now. This is a 7.2-RELEASE-p6 right now. Both disks are regular ATA and healthy according smartctl. Sometimes, not always though, I do experience spontaneous reboots without leaving any hints in logfiles whenver I "beat" my disks "excessively". This might be something like: dd if=/dev/null of=/some/file bs=1M count=4k plus parallel disk accesses by mail and news server. If I omit all parallel disk access those dd's will run to completion without reboots, always. It might well be that there is something wrong with my hardware (co-located, no access to the console available). Thus, before addressing support I'd like to know: has anyone else seen reboots under those conditions? Regards, Michael -- to let ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"