1/* 2 * Copyright (c) 2005-2006 The FreeBSD Project 3 * All rights reserved. 4 * 5 * Author: Victor Cruceru <soc-victor@freebsd.org> 6 * 7 * Redistribution of this software and documentation and use in source and 8 * binary forms, with or without modification, are permitted provided that --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c 154860 2006-01-26 12:19:10Z harti $ |
30 * 31 * Host Resources MIB for SNMPd. Implementation for hrSWRunTable 32 */ 33 34#include <sys/param.h> 35#include <sys/proc.h> 36#include <sys/sysctl.h> 37#include <sys/user.h> --- 157 unchanged lines hidden (view full) --- 195 */ 196static void 197kinfo_proc_to_swrun_entry(const struct kinfo_proc *kp, 198 struct swrun_entry *entry) 199{ 200 char **argv = NULL; 201 uint64_t cpu_time = 0; 202 |
203 strlcpy((char*)entry->name, kp->ki_comm, sizeof(entry->name)); |
204 205 entry->id = oid_zeroDotZero; /* unknown id - FIXME */ 206 207 entry->path[0] = '\0'; 208 entry->parameters[0] = '\0'; 209 210 assert(hr_kd != NULL); 211 --- 540 unchanged lines hidden --- |