All Data Structures Functions Variables Enumerations Enumerator Groups Pages
disk.h
/*
* libsysactivity
* http://sourceforge.net/projects/libsysactivity/
* Copyright (c) 2009, 2010 Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef SA_DISK_H_
#define SA_DISK_H_
struct sa_disk {
#ifdef SA_DISK_NAME
char name[SA_DISK_NAME];
#endif
#ifdef SA_DISK_READS
uint64_t reads;
#endif
#ifdef SA_DISK_READS_MERGED
uint64_t reads_merged;
#endif
#ifdef SA_DISK_SECTORS_READ
uint64_t sectors_read;
#endif
#ifdef SA_DISK_TIME_SPENT_READING
uint64_t time_spent_reading;
#endif
#ifdef SA_DISK_WRITES
uint64_t writes;
#endif
#ifdef SA_DISK_SECTORS_WRITTEN
uint64_t sectors_written;
#endif
#ifdef SA_DISK_TIME_SPENT_WRITING
uint64_t time_spent_writing;
#endif
#ifdef SA_DISK_BYTES_READ
uint64_t bytes_read;
#endif
#ifdef SA_DISK_BYTES_WRITTEN
uint64_t bytes_written;
#endif
};
#ifdef SA_OPEN_DISK
int sa_open_disk(void) SA_EXPORT;
#endif
#ifdef SA_CLOSE_DISK
int sa_close_disk(void) SA_EXPORT;
#endif
int sa_count_disks(uint16_t* number) SA_EXPORT SA_NONNULL;
int sa_reset_disks() SA_EXPORT;
int sa_get_disks_ids(char* dst, uint16_t dst_size, uint16_t* written) SA_EXPORT SA_NONNULL;
int sa_get_disk(char* name, struct sa_disk* dst) SA_EXPORT SA_NONNULL;
int sa_get_disks(struct sa_disk* dst, uint16_t dst_size, uint16_t* written) SA_EXPORT SA_NONNULL;
#endif /* SA_DISK_H_ */