Re: DKIM-Milter in Freebsd 9.0

2012-03-11 Thread Robert Simmons
On Sat, Mar 10, 2012 at 12:41 PM, Elman elman_s...@yahoo.com wrote:
 Dear hacker,

 I install freebsd 9.0 release for the mail server, but no dkim-milter in 
 freebsd 9.0. I've been looking there, but it doesn't exist and only open-dkim 
 in freebsd 9.0. Is freebsd 9.0 no longer providing dkim-milter again in 
 freebsd port.? Before I was use freebsd 8.2 for mail server, there are still 
 exist dkim-milter. I finally install dkim-milter from source and manual 
 compile.

According to the dkim-milter project website:
As of 2011-12-13, this project is no longer under active development.
And:
NOTE: dkim-milter has been replaced by OpenDKIM, available at
http://opendkim.org/;

And from the OpenDKIM website:
The project started from a code fork of version 2.8.3 of the open
source dkim-milter package developed and maintained by Sendmail, Inc.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


pmc(3): when are the counters updated?

2012-03-11 Thread Vitaly Magerya
Hi, folks. I'm trying to use pmc(3) to analyze code fragments, and
I've run into strange behavior: the counter values returned by
pmc_read(3) sometimes show no increment between readings, but are
updated a second later; even if the PMC in question was stopped
before.

Here's a test program:

#include sys/types.h
#include pmc.h
#include stdio.h
#include unistd.h

int main() {
pmc_id_t pmcid;
pmc_value_t value;
int i;

pmc_init();
pmc_allocate(instructions, PMC_MODE_TC, 0, PMC_CPU_ANY, pmcid);
pmc_start(pmcid);
for (i = 0; i  500; i++);
pmc_stop(pmcid);
pmc_read(pmcid, value);
printf(first reading:  %lu\n, (unsigned long)value);
sleep(1);
pmc_read(pmcid, value);
printf(second reading: %lu\n, (unsigned long)value);
}

It's output on my system (FreeBSD 8.2 amd64, an Intel Atom processor)
is something like this:

first reading:  0
second reading: 15090110

I don't really like both numbers; I expect the first reading not
to be zero (there obviously are instructions between pmc_start and
pmc_stop), and I expect the second reading not to differ from the
first, as the PMC was stopped before both of them, so it's value
should not change.

So, what's going on here? Is this the intended behavior, or can it
be changed? And how do I get accurate readings?

(BTW, is this the right list for such questions?)
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Kernel memory usage

2012-03-11 Thread Da Rock
I may be required to move this to embedded, but I am only looking for 
generalisation.


Recently a thread came up on questions regarding memory usage, and a 
post was made regarding wired memory being nearly all kernel- something 
I was ready to dispute, but then I thought I'd better make sure.


So I tested a few theories first off:

1. Comparing memory usage across machines

I checked servers and desktops as well as vm's for memory usage, and I 
found some interesting results. On a firewall with no apps installed 
only 35M wired is used, on a desktop up to 700M~ can be used. Even as a 
dedicated server with a few services used it remains around 35M.


Surely this means that the wired memory used is not just kernel? But I 
held off my assumptions as it was still plausible that the structures 
used by the kernel could balloon that far, too.


2. Stripped down, lean mean, kernel machine

I then (using a vm I was building a kernel for anyway) stripped down a 
kernel in a VBox VM using le drivers for network to see what could be 
achieved. This is my kernel conf:


include GENERIC
ident VPN
options IPSEC
options IPSEC_DEBUG
options IPSEC_NAT_T
device crypto
device enc

# minimise kernel
nooptions UFS_GJOURNAL
nooptions MD_ROOT
nooptions NFSCL
nooptions NFSD
nooptions NFSLOCKD
nooptions NFS_ROOT
nooptions MSDOSFS
nooptions CD9660
nooptions PROCFS
nooptions PSEUDOFS
nodevice fdc
nodevice mvs
nodevice siis
nodevice ahc
nodevice ahd
nodevice esp
nodevice hptiop
nodevice isp
nodevice mpt
nodevice mps
nodevice sym
nodevice trm
nodevice adv
nodevice adw
nodevice aic
nodevice bt
nodevice ses
nodevice amr
nodevice arcmsr
nodevice ciss
nodevice dpt
nodevice hptmv
nodevice hptrr
nodevice irr
nodevice ips
nodevice mly
nodevice twa
nodevice aac
nodevice aacp
nodevice ida
nodevice mfi
nodevice mlx
nodevice twe
nodevice tws
nodevice splash
nodevice cbb
nodevice pccard
nodevice cardbus
nodevice uart
nodevice ppc
nodevice ppbus
nodevice lpt
nodevice plip
nodevice ppi
nodevice puc
nodevice bxe
nodevice de
nodevice em
nodevice igb
nodevice ixgbe
nodevice ti
nodevice txp
nodevice vx
nodevice miibus
nodevice ae
nodevice age
nodevice alc
nodevice ale
nodevice bce
nodevice bfe
nodevice bge
nodevice dc
nodevice et
nodevice fxp
nodevice jme
nodevice lge
nodevice msk
nodevice nfe
nodevice nge
nodevice pcn
nodevice re
nodevice rl
nodevice sf
nodevice sge
nodevice sis
nodevice sk
nodevice ste
nodevice stge
nodevice tl
nodevice tx
nodevice vge
nodevice vr
nodevice wb
nodevice xl
nodevice cs
nodevice ed
nodevice ex
nodevice ep
nodevice fe
nodevice sn
nodevice xe
nodevice wlan
nooptions IEEE80211_DEBUG
nooptions IEEE80211_AMPDU_AGE
nooptions IEEE80211_SUPPORT_MESH
nodevice wlan_wep
nodevice wlan_ccmp
nodevice wlan_tkip
nodevice wlan_amrr
nodevice an
nodevice ath
nodevice ath_pci
nodevice ath_hal
nooptions AH_SUPPORT_AR5416
nodevice ath_rate_sample
nodevice ipw
nodevice iwi
nodevice iwn
nodevice malo
nodevice mwl
nodevice ral
nodevice wi
nodevice wpi
nodevice md
nooption USB_DEBUG
nodevice uhci
nodevice ohci
nodevice ehci
nodevice xhci
nodevice usb
nodevice uhid
nodevice ukbd
nodevice ulpt
nodevice umass
nodevice ums
nodevice urio
nodevice u3g
nodevice uark
nodevice ubsa
nodevice uftdi
nodevice uipaq
nodevice uplcom
nodevice uslcom
nodevice uvisor
nodevice uvscom
nodevice aue
nodevice axe
nodevice cdce
nodevice cue
nodevice kue
nodevice rue
nodevice udav
nodevice rum
nodevice run
nodevice uath
nodevice upgt
nodevice ural
nodevice urtw
nodevice zyd
#nodevice firewire
nodevice fwe
nodevice fwip
#nodevice dcons
#nodevice dcons_rom
nodevice sound
nodevice snd_es137x
nodevice snd_hda
nodevice snd_ich
nodevice snd_uaudio
nodevice snd_via8233

World was also rebuilt as recommended by the handbook. As you can see I 
was rebuilding for IPSEC (for testing purposes only note). I couldn't 
remove dcons (not sure why- missing defined references), and that pulled 
in firewire too.


The result was surprising: a 14M kernel became 6.3M, and when running I 
found it only used 19M used for wired (whoopee!) as opposed to 35M. No 
services were running per se, only the usual suspects in base:


vpn-test# ps ax
  PID  TT  STAT  TIME COMMAND
0  ??  DLs0:00.11 [kernel]
1  ??  ILs0:00.01 /sbin/init --
2  ??  DL 0:00.00 [crypto]
3  ??  DL 0:00.00 [crypto returns]
4  ??  DL 0:00.00 [sctp_iterator]
5  ??  DL 0:00.00 [xpt_thrd]
6  ??  DL 0:00.10 [pagedaemon]
7  ??  DL 0:00.00 [vmdaemon]
8  ??  DL 0:00.01 [pagezero]
9  ??  DL 0:00.30 [bufdaemon]
   10  ??  DL 0:00.00 [audit]
   11  ??  RL   589:34.00 [idle]
   12  ??  WL 0:38.64 [intr]
   13  ??  DL 0:12.21 [geom]
   14  ??  DL 0:03.30 [yarrow]
   15  ??  DL 0:04.40 [syncer]
   16  ??  DL 0:00.63 [vnlru]
   17  ??  DL 0:00.53 [softdepflush]
  104  ??  Is 0:00.00 adjkerntz -i
  582  ??  Is 0:00.00 /sbin/devd
  737  ??  Ss 0:00.09 /usr/sbin/syslogd -s
  912  ??  Ss 0:02.68 /usr/sbin/ntpd -c