The proc.c patch adds FreeBSD 8.0+ jail  support for the proc.num item.
The item takes a fifth parameter as a jail ID or name.
- If the parameter is empty, information about all processes on the server is returned.
- If the parameter contains the name or ID of an existing jail, information about processes inside the jail is returned.
- If the parameter contains 0, information about processes on the host is returned only, processes inside jails are ignored.
This behavior corresponds to the ps (-J option)  and sockstat (-j option)  utilities.
This patch requires the libjail  library, which was introduced in FreeBSD 8.0, so I added a patch to configure.ac that checks for the libjail library. If the library is not found, the fifth parameter of the proc.num item is ignored.