Skip to content
Snippets Groups Projects
Select Git revision
  • ed1b32c13229175a26ab47d450522630f72b0bee
  • master default protected
  • 72-improve-docs-for_optimal_setup
  • os-path-join
  • develop-GA
  • add-higher-spindown-components
  • v1.3
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
11 results

plot_data.py

Blame
  • smartd.cpp 45.57 KiB
    /*
     * Home page of code is: http://smartmontools.sourceforge.net
     *
     * Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
     * Copyright (C) 2000 Michael Cornwell <cornwell@acm.org>
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation; either version 2, or (at your option)
     * any later version.
     *
     * You should have received a copy of the GNU General Public License
     * (for example COPYING); if not, write to the Free
     * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     *
     * This code was originally developed as a Senior Thesis by Michael Cornwell
     * at the Concurrent Systems Laboratory (now part of the Storage Systems
     * Research Center), Jack Baskin School of Engineering, University of
     * California, Santa Cruz. http://ssrc.soe.ucsc.edu/
     *
     */
    
    #define _GNU_SOURCE
    #include <stdio.h>
    #include <sys/ioctl.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <sys/wait.h>
    #include <unistd.h>
    #include <fcntl.h>
    #include <string.h>
    #include <linux/hdreg.h>
    #include <syslog.h>
    #include <stdarg.h>
    #include <signal.h>
    #include <stdlib.h>
    #include <errno.h>
    #include <string.h>
    #include <time.h>
    #include <limits.h>
    #ifdef HAVE_GETOPT_H
    #include <getopt.h>
    #endif
    #include "atacmds.h"
    #include "scsicmds.h"
    #include "smartd.h"
    #include "ataprint.h"
    #include "extern.h"
    
    
    // CVS ID strings
    extern const char *CVSid1, *CVSid2;
    const char *CVSid6="$Id: smartd.cpp,v 1.87 2002/12/15 21:08:23 ballen4705 Exp $" 
    CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
    
    // global variable used for control of printing, passing arguments, etc.
    atamainctrl *con=NULL;
    
    // Two other globals -- number of ATA and SCSI devices being monitored
    int numatadevices=0;
    int numscsidevices=0;
    
    // How long to sleep between checks.  Handy as global variable for
    // debugging
    int checktime=CHECKTIME;
    
    // Needed to interrupt sleep when catching SIGUSR1.  Unix Gurus: I
    // know that this can be done better.  Please tell me how -- use email
    // address for Bruce Allen at the top of this file.  Search for
    // "sleeptime" to see what I am doing.