--- Vmubc is available on the Freeware CD, as well as: ftp://gatekeeper.dec.com/pub/DEC/vmubc.tar.Z http://ftp.digital.com/pub/digital/vmubc.tar.Z http://www.unix.digital.com/demos/freesrc/Original_Base_Src/vmubc-1.4.tar.gz Looking in http://www.unix.digital.com/unix/faq/software.html I find: "vmubc ... was written by George Chaltas at Compaq". In 1994? Rewriting history, following in the footsteps of the great dictators? --- *** system.c.old Wed Feb 14 06:37:54 1996 --- system.c Wed Feb 23 09:16:13 2000 *************** *** 300,305 **** --- 300,306 ---- { int states[5]; + if (nl[N_UBC_PAGES].n_value) { if (lseek(kmem, (long) nl[N_UBC_PAGES].n_value, SEEK_SET) != (long) nl[N_UBC_PAGES].n_value) { perror("ubc_pages; lseek"); *************** *** 308,314 **** --- 309,318 ---- sizeof(ubc_pages)) { perror("ubc_pages; read"); } + } + else { ubc_pages = 0; } + if (nl[N_UBC_MINPAGES].n_value) { if (lseek(kmem, (long) nl[N_UBC_MINPAGES].n_value, SEEK_SET) != (long) nl[N_UBC_MINPAGES].n_value) { perror("ubc_minpages; lseek"); *************** *** 317,323 **** --- 321,330 ---- sizeof(ubc_minpages)) { perror("ubc_minpages; read"); } + } + else { ubc_minpages = 0; } + if (nl[N_UBC_MAXPAGES].n_value) { if (lseek(kmem, (long) nl[N_UBC_MAXPAGES].n_value, SEEK_SET) != (long) nl[N_UBC_MAXPAGES].n_value) { perror("ubc_maxpages; lseek"); *************** *** 326,331 **** --- 333,340 ---- sizeof(ubc_maxpages)) { perror("ubc_maxpages; read"); } + } + else { ubc_maxpages = 0; } if (lseek(kmem, (long) nl[N_VM_MANAGED_PAGES].n_value, SEEK_SET) != (long) nl[N_VM_MANAGED_PAGES].n_value) { *************** *** 349,354 **** --- 358,364 ---- { int states[5]; + if (nl[N_UBC_DIRTYPAGES].n_value) { if (lseek(kmem, (long) nl[N_UBC_DIRTYPAGES].n_value, SEEK_SET) != (long) nl[N_UBC_DIRTYPAGES].n_value) { perror("ubc_dirtypages; lseek"); *************** *** 357,362 **** --- 367,374 ---- sizeof(ubc_dirtypages)) { perror("ubc_dirtypages; read"); } + } + else { ubc_dirtypages = 0; } states[0] = ubc_pages-ubc_dirtypages; states[1] = ubc_dirtypages; *************** *** 494,499 **** --- 506,512 ---- fprintf(stderr, "nlist failed to read _machine_slot:\n"); exit(1); } + if (! nlis[0].n_value) { fprintf (stderr, "Cannot find machine_slot (will not show multi-CPU usage)\n"); } mslot = (struct machine_slot *)nlis[0].n_value; #ifdef GSI_CPUS_IN_BOX *************** *** 563,569 **** --- 576,584 ---- float total; struct tick_struct temp_info; + if (mslot) { getkmem(mslot,machine_slot,sizeof(machine_slot),"machine_slot"); + } for (i = 0; i < ncpus; i++) { if( getcpudata( i, &cpu_info[i] ) ) { *************** *** 683,688 **** --- 698,708 ---- perror(kname); exit(1); } + + if (! nl[N_UBC_PAGES].n_value) { fprintf (stderr, "Cannot find ubc_pages (will show zero)\n"); } + if (! nl[N_UBC_MINPAGES].n_value) { fprintf (stderr, "Cannot find ubc_minpages (will show zero)\n"); } + if (! nl[N_UBC_MAXPAGES].n_value) { fprintf (stderr, "Cannot find ubc_maxpages (will show zero)\n"); } + if (! nl[N_UBC_DIRTYPAGES].n_value) { fprintf (stderr, "Cannot find ubc_dirtypages (will show zero)\n"); } if ((kmem = open(_PATH_KMEM, O_RDONLY)) < 0) { perror(_PATH_KMEM);Received on Tue Feb 22 2000 - 23:34:34 NZDT
This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:40 NZDT