alignment

This commit is contained in:
albert 2003-08-11 01:59:53 +00:00
parent 8618adeaaf
commit 6ba229fa4c
7 changed files with 39 additions and 33 deletions

View File

@ -18,9 +18,9 @@
VERSION := 3 VERSION := 3
SUBVERSION := 1 SUBVERSION := 1
MINORVERSION := 11 MINORVERSION := 12
TARVERSION := 3.1.11 TARVERSION := 3.1.12
LIBVERSION := 3.1.11 LIBVERSION := 3.1.12
############ vars ############ vars

6
NEWS
View File

@ -1,3 +1,9 @@
procps-3.1.11 --> procps-3.1.12
RPM generation handles /lib64
WCHAN skips leading '.'
vmstat: numerous new features
procps-3.1.10 --> procps-3.1.11 procps-3.1.10 --> procps-3.1.11
compile with gcc 2.95 again (C99 issue) compile with gcc 2.95 again (C99 issue)

View File

@ -89,20 +89,20 @@ extern unsigned long vm_allocstall;
extern void vminfo(void); extern void vminfo(void);
typedef struct disk_stat{ typedef struct disk_stat{
unsigned int disk_type;
char disk_name [16];
unsigned reads;
unsigned merged_reads;
unsigned long long reads_sectors; unsigned long long reads_sectors;
unsigned milli_reading;
unsigned writes;
unsigned merged_writes;
unsigned long long written_sectors; unsigned long long written_sectors;
unsigned milli_writing; char disk_name [16];
unsigned int disk_type;
unsigned inprogress_IO; unsigned inprogress_IO;
unsigned merged_reads;
unsigned merged_writes;
unsigned milli_reading;
unsigned milli_spent_IO; unsigned milli_spent_IO;
unsigned weighted_milli_spent_IO; unsigned milli_writing;
unsigned partitions; unsigned partitions;
unsigned reads;
unsigned weighted_milli_spent_IO;
unsigned writes;
}disk_stat; }disk_stat;
typedef struct partition_stat{ typedef struct partition_stat{

View File

@ -1,15 +1,15 @@
Begin4 Begin4
Title: procps Title: procps
Version: 3.1.11 Version: 3.1.12
Entered-date: 2003-07-14 Entered-date: 2003-08-10
Description: Linux system utilities Description: Linux system utilities
Keywords: procps /proc libproc sysctl pmap ps uptime tload Keywords: procps /proc libproc sysctl pmap ps uptime tload
free w top vmstat watch skill snice kill pgrep pkill free w top vmstat watch skill snice kill pgrep pkill
Author: Albert Cahalan, Michael K. Johnson, Jim Warner, etc. Author: Albert Cahalan, Michael K. Johnson, Jim Warner, etc.
Maintained-by: various <procps-feedback@lists.sf.net> Maintained-by: various <procps-feedback@lists.sf.net>
Primary-site: http://procps.sf.net/ Primary-site: http://procps.sf.net/
242kB procps-3.1.11.tar.gz 242kB procps-3.1.12.tar.gz
Alternate-site: http://www.debian.org/Packages/unstable/base/procps.html Alternate-site: http://www.debian.org/Packages/unstable/base/procps.html
242kB procps-3.1.11.tar.gz 242kB procps-3.1.12.tar.gz
Copying-policy: mixed Copying-policy: mixed
End End

View File

@ -3,7 +3,7 @@ Summary: System and process monitoring utilities
Name: procps Name: procps
%define major_version 3 %define major_version 3
%define minor_version 1 %define minor_version 1
%define revision 11 %define revision 12
%define version %{major_version}.%{minor_version}.%{revision} %define version %{major_version}.%{minor_version}.%{revision}
Version: %{version} Version: %{version}
Release: 1 Release: 1

2
top.h
View File

@ -185,8 +185,8 @@ typedef struct FLD_t {
information from one frame to the next -- we don't calc information from one frame to the next -- we don't calc
and save data that goes unused like the old top! */ and save data that goes unused like the old top! */
typedef struct HST_t { typedef struct HST_t {
int pid;
TIC_t tics; TIC_t tics;
int pid;
} HST_t; } HST_t;
/* This structure stores a frame's cpu tics used in history /* This structure stores a frame's cpu tics used in history

View File

@ -163,7 +163,7 @@ static void new_header(void){
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
static void new_diskheader(void){ static void diskheader(void){
printf("disk ----------reads------------ -----------writes----------- -------IO-------\n"); printf("disk ----------reads------------ -----------writes----------- -------IO-------\n");
printf("%3s %6s %6s %6s %6s %6s %6s %6s %6s %6s %6s\n", " ", "total", "merged","sectors","ms","total","merged","sectors","ms","cur","s"); printf("%3s %6s %6s %6s %6s %6s %6s %6s %6s %6s %6s\n", " ", "total", "merged","sectors","ms","total","merged","sectors","ms","cur","s");
@ -172,13 +172,13 @@ static void new_diskheader(void){
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
static void new_diskpartition_header(const char *partition_name){ static void diskpartition_header(const char *partition_name){
printf("%-10s %10s %10s %10s %10s\n",partition_name, "reads ", "read sectors", "writes ", "requested writes"); printf("%-10s %10s %10s %10s %10s\n",partition_name, "reads ", "read sectors", "writes ", "requested writes");
} }
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
static void new_slabheader(void){ static void slabheader(void){
printf("%-24s %6s %6s %6s %6s\n","Cache","Num", "Total", "Size", "Pages"); printf("%-24s %6s %6s %6s %6s\n","Cache","Num", "Total", "Size", "Pages");
} }
@ -290,7 +290,7 @@ static void new_format(void) {
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
static int new_diskpartition_format(const char* partition_name){ static int diskpartition_format(const char* partition_name){
FILE *fDiskstat; FILE *fDiskstat;
struct disk_stat *disks; struct disk_stat *disks;
struct partition_stat *partitions, *current_partition=NULL; struct partition_stat *partitions, *current_partition=NULL;
@ -309,14 +309,14 @@ static int new_diskpartition_format(const char* partition_name){
if(!current_partition){ if(!current_partition){
return -1; return -1;
} }
new_diskpartition_header(partition_name); diskpartition_header(partition_name);
printf (format, printf (format,
current_partition->reads,current_partition->reads_sectors,current_partition->writes,current_partition->requested_writes); current_partition->reads,current_partition->reads_sectors,current_partition->writes,current_partition->requested_writes);
fflush(stdout); fflush(stdout);
free(disks); free(disks);
free(partitions); free(partitions);
for(j=1; j<num_updates; j++){ for(j=1; j<num_updates; j++){
if (moreheaders && ((j%height)==0)) new_diskpartition_header(partition_name); if (moreheaders && ((j%height)==0)) diskpartition_header(partition_name);
sleep(sleep_time); sleep(sleep_time);
ndisks=getdiskstat(&disks,&partitions); ndisks=getdiskstat(&disks,&partitions);
npartitions=getpartitions_num(disks, ndisks); npartitions=getpartitions_num(disks, ndisks);
@ -343,7 +343,7 @@ static int new_diskpartition_format(const char* partition_name){
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
static void new_diskformat(void){ static void diskformat(void){
FILE *fDiskstat; FILE *fDiskstat;
struct disk_stat *disks; struct disk_stat *disks;
struct partition_stat *partitions; struct partition_stat *partitions;
@ -353,7 +353,7 @@ static void new_diskformat(void){
fclose(fDiskstat); fclose(fDiskstat);
ndisks=getdiskstat(&disks,&partitions); ndisks=getdiskstat(&disks,&partitions);
for(k=0; k<ndisks; k++){ for(k=0; k<ndisks; k++){
if (moreheaders && ((k%height)==0)) new_diskheader(); if (moreheaders && ((k%height)==0)) diskheader();
printf(format, printf(format,
disks[k].disk_name,disks[k].reads, disks[k].merged_reads,disks[k].reads_sectors, disks[k].milli_reading, disks[k].writes, disks[k].merged_writes, disks[k].written_sectors,disks[k].milli_writing, disks[k].inprogress_IO?disks[k].inprogress_IO/1000:0, disks[k].milli_spent_IO?disks[k].milli_spent_IO/1000:0/*, disks[i].weighted_milli_spent_IO/1000*/); disks[k].disk_name,disks[k].reads, disks[k].merged_reads,disks[k].reads_sectors, disks[k].milli_reading, disks[k].writes, disks[k].merged_writes, disks[k].written_sectors,disks[k].milli_writing, disks[k].inprogress_IO?disks[k].inprogress_IO/1000:0, disks[k].milli_spent_IO?disks[k].milli_spent_IO/1000:0/*, disks[i].weighted_milli_spent_IO/1000*/);
fflush(stdout); fflush(stdout);
@ -364,7 +364,7 @@ static void new_diskformat(void){
sleep(sleep_time); sleep(sleep_time);
ndisks=getdiskstat(&disks,&partitions); ndisks=getdiskstat(&disks,&partitions);
for(i=0; i<ndisks; i++,k++){ for(i=0; i<ndisks; i++,k++){
if (moreheaders && ((k%height)==0)) new_diskheader(); if (moreheaders && ((k%height)==0)) diskheader();
printf(format, printf(format,
disks[i].disk_name, disks[i].disk_name,
disks[i].reads, disks[i].reads,
@ -392,7 +392,7 @@ static void new_diskformat(void){
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
static void new_slabformat (void){ static void slabformat (void){
FILE *fSlab; FILE *fSlab;
struct slab_cache *slabs; struct slab_cache *slabs;
unsigned long nSlab,i,j,k; unsigned long nSlab,i,j,k;
@ -406,7 +406,7 @@ static void new_slabformat (void){
nSlab = getslabinfo(&slabs); nSlab = getslabinfo(&slabs);
for(k=0; k<nSlab; k++){ for(k=0; k<nSlab; k++){
if (moreheaders && ((k%height)==0)) new_slabheader(); if (moreheaders && ((k%height)==0)) slabheader();
printf(format, printf(format,
slabs[k].name, slabs[k].name,
slabs[k].active_objs, slabs[k].active_objs,
@ -420,7 +420,7 @@ static void new_slabformat (void){
sleep(sleep_time); sleep(sleep_time);
nSlab = getslabinfo(&slabs); nSlab = getslabinfo(&slabs);
for(i=0; i<nSlab; i++,k++){ for(i=0; i<nSlab; i++,k++){
if (moreheaders && ((k%height)==0)) new_slabheader(); if (moreheaders && ((k%height)==0)) slabheader();
printf(format, printf(format,
slabs[i].name, slabs[i].name,
slabs[i].active_objs, slabs[i].active_objs,
@ -644,12 +644,12 @@ int main(int argc, char *argv[]) {
break; break;
case(VMSUMSTAT): sum_format(); case(VMSUMSTAT): sum_format();
break; break;
case(DISKSTAT): new_diskformat(); case(DISKSTAT): diskformat();
break; break;
case(PARTITIONSTAT): if(new_diskpartition_format(partition)==-1) case(PARTITIONSTAT): if(diskpartition_format(partition)==-1)
printf("Partition was not found\n"); printf("Partition was not found\n");
break; break;
case(SLABSTAT): new_slabformat(); case(SLABSTAT): slabformat();
break; break;
case(DISKSUMSTAT): disksum_format(); case(DISKSUMSTAT): disksum_format();
break; break;