From owner-freebsd-current@FreeBSD.ORG Fri Apr 4 16:07:56 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C8F237B401 for ; Fri, 4 Apr 2003 16:07:56 -0800 (PST) Received: from symbion.srrc.usda.gov (symbion.srrc.usda.gov [199.133.86.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19F9C43FAF for ; Fri, 4 Apr 2003 16:07:55 -0800 (PST) (envelope-from gjohnson@srrc.ars.usda.gov) Received: from node1.cluster.srrc.usda.gov (localhost [127.0.0.1]) by symbion.srrc.usda.gov (8.12.9/8.12.9) with ESMTP id h3507Dta042243; Fri, 4 Apr 2003 18:07:13 -0600 (CST) (envelope-from glenn@node1.cluster.srrc.usda.gov) Received: (from glenn@localhost)h3507DIT042242; Fri, 4 Apr 2003 18:07:13 -0600 (CST) (envelope-from glenn) Date: Fri, 4 Apr 2003 18:07:12 -0600 From: Glenn Johnson To: Julian Elischer Message-ID: <20030405000712.GA9839@node1.cluster.srrc.usda.gov> Mail-Followup-To: Glenn Johnson , Julian Elischer , current@freebsd.org References: <20030404234917.GA98049@node1.cluster.srrc.usda.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: current@freebsd.org Subject: Re: kp_proc and kp_eproc X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 00:07:56 -0000 On Fri, Apr 04, 2003 at 03:54:05PM -0800, Julian Elischer wrote: > yes.. > > The entire process structure and it's surrounding enviroment has been > through a blender. > > What do you wnat to do? I would like to learn what I need to do to get the software to compile on FreeBSD-5. I guess the question is, what information do I need to provide? The software in question is OpenPBS (http://www.openpbs.org), so it nothing proprietary. There were a whole bunch of dependency problems that I worked through manually and finally got to the point of the kp_proc failure. Here is a snippet of code that produces the failure: ~~~~~~~~~~ static unsigned long cput_sum(pjob) job *pjob; { static char id[] = "cput_sum"; int i; u_long cputime; int nps = 0; cputime = 0; for (i=0; ikp_proc.p_rtime); if (pp->kp_proc.p_ru == NULL) { struct pstats ps; DBPRT(("%s: p_stats 0x%lx\n", id, (u_long)pp->kp_proc.p_stats)) if (pp->kp_proc.p_stats == NULL) continue; if (kvm_read(kd, (u_long)pp->kp_proc.p_stats, &ps, sizeof(ps)) != sizeof(ps)) { log_err(errno, id, "kvm_read(pstats)"); continue; } cputime += tv(ps.p_ru.ru_utime) + tv(ps.p_ru.ru_stime) + tv(ps.p_cru.ru_utime) + tv(ps.p_cru.ru_stime); } else { struct rusage ru; DBPRT(("%s: p_ru 0x%lx\n", id, (u_long)pp->kp_proc.p_ru)) if (kvm_read(kd, (u_long)pp->kp_proc.p_ru, &ru, sizeof(ru)) != sizeof(ru)) { log_err(errno, id, "kvm_read(session)"); continue; } cputime += tv(ru.ru_utime) + tv(ru.ru_stime); } DBPRT(("%s: ses %d pid %d cputime %d\n", id, sess_tbl[i], pp->kp_proc.p_pid, cputime)) } if (nps == 0) pjob->ji_flags |= MOM_NO_PROC; return ((unsigned long)((double)cputime * cputfactor)); } ~~~~~~~~~~ > On Fri, 4 Apr 2003, Glenn Johnson wrote: > > > I have some software that compiled fine on FreeBSD-4 but is not > > compiling on FreeBSD-5. It is looking for kp_proc and kp_eproc. > > The error I get is: > > > > structure has no member named `kp_proc' > > structure has no member named `kp_eproc' > > > > Have those changed from FreeBSD-4? > > > > Thanks. -- Glenn Johnson USDA, ARS, SRRC Phone: (504) 286-4252 New Orleans, LA 70124 e-mail: gjohnson@srrc.ars.usda.gov