How to find out the unused disk space?

Hi,
I want to know if there is any way possible by which I can find out the amount of disk space that is available. I have to write an application that checks for the disk space under Windows and Unix platforms. If anything is possible please let me know as soon as possible.

I know that there is no Java API for it. I tried using the Runtime.getRuntime().exec("cmd /c dir") method to find out the available disk space. But it returns the value through the InputStream which would have to be parsed to get the unused disk space value. If there is a way to write a shell script (for Unix / Linux) and a batch file (for Windows), please do let me know of the same. Also please let me know how to execute the script / batch. Awaiting your reply.

Similar Messages

  • Query to find out the free disk space on C: drive

    Hi Guys,
    I am trying to create a query in  Queries section under Monitoring, To find out the free disk space of C: drive.
    Am using the below query, but it shows lot many fields, I need only Machine names of the collection and their
    Free Disk Space on C: drive
    select * from SMS_R_System inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceId = SMS_R_System.ResourceId where SMS_G_System_LOGICAL_DISK.DeviceID = "C:" and SMS_G_System_LOGICAL_DISK.FreeSpace > 1024
    Please assist

    The SELECT part of the query will govern what fields you are shown, so perhaps try:
    Select SMS_R_System.ResourceID, SMS_R_System.NETBIOSname, SMS_G_System_Logical_Disk.FreeSpace
    from SMS_R_System
    inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceId = SMS_R_System.ResourceId
    where SMS_G_System_LOGICAL_DISK.DeviceID = "C:" and SMS_G_System_LOGICAL_DISK.FreeSpace > 1024
    I hope that helps,
    Nash
    Nash Pherson, Senior Systems Consultant
    Now Micro -
    My Blog Posts
    If you found a bug or want the product to work differently,
    share your feedback.
    <-- If this post was helpful, please click the up arrow or propose as answer.

  • How can I find out the percentage of space taken up by a vector in a document?

    Hi all,
    I've been doing visual research over the last couple of years, and part of this has resulted in hundreds of in-design documents with vectors of varying sizes in each. Essentially, I'm hoping to find a quick way to find out the percentage of space occupied by these vectors. I can't figure out how to go in to each document and find the info on the selected vector. I know that Photoshop has options to see pixels when using selection tools, but I've found this both cumbersome and inaccurate.
    Any ideas would be greatly appreciated!
    Cheers,
    Kevin

    java.io.BufferedReader in = new java.io.BufferedReader( new java.io.FileReader( "YourFile.txt" ) );
    int lineCount = 0;
    while( in.readLine() != null )
    lineCount ++;
    System.out.println( "Line Count = " + lineCount );

  • HOW to find out the tablespace space utilized by a patch after applying the

    someone has already applied the patch in test env before recording the tablespace size , so I cannot find out the figure in test env.
    So is there any general practice or general guidelines on it?
    hOW to find out the tablespace space utilized by a patch after applying the patch?
    Thanks & Regards,
    Sree.
    Edited by: 846579 on Mar 22, 2011 10:50 PM

    I think there is no direct way to determine what tablespace is utilized by a patch from the README file. You could check the content of the patch file and see what modules are affected (assuming there are changes and the database level), then query DBA_USERS (DEFAULT_TABLESPACE column) for those schemas which are updated by a patch. Or, you could check the size of the tablespaces before and after applying the patch and you will determine what tablespaces have been utilized (provided that the application services are down, and none of the application users is connected to the application).
    Thanks,
    Hussein

  • How to find out the Transactions used per month & the USER who used that

    Hi,
    1)How to find out the Transactions used per month & the USER who used that?
    2)and can i get the above same for minimum 20 month?
    System : SAP- Enterprise Core Component.

    You can use my program...
    *& Report  Z_ABAP_TCODE_MONITOR
    *****&  Program Type          : Report                                 *
    *****&  Title                 : Z_ABAP_TCODE_MONITOR                   *
    *****&  Transaction code      : ZTCODE_USAGE                           *
    *****&  Developer name        : Shailendra Kolakaluri                  *
    *****&  Deveopment start date : 26 th Dec 2011                         *
    *****&  Development Package   : ZDEV                                   *
    *****&  Transport No          : DEVK906086                                       *
    *****&  Program Description   : This program is to display
    *List all tcodes executed during previous day.
    *& Show the number of users executing tcodes
    *& Modification history
    REPORT  Z_ABAP_TCODE_MONITOR.
    *& List all tcodes executed during previous day.
    *& Show the number of users executing tcodes
    TYPE-POOLS : slis.
    DATA: ind TYPE i,
          fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          layout TYPE slis_layout_alv,
          variant TYPE disvariant,
          events  TYPE slis_t_event WITH HEADER LINE,
          heading TYPE slis_t_listheader WITH HEADER LINE.
    *REPORT  z_report_usage.
    TYPES: BEGIN OF zusertcode,
      date   TYPE swncdatum,
      user   TYPE swncuname,
      mandt     TYPE swncmandt,
      tcode     TYPE swnctcode,
      report TYPE swncreportname,
      count     TYPE swncshcnt,
    END OF zusertcode.
    *data   : date type n.
    DATA: t_usertcode  TYPE swnc_t_aggusertcode,
          wa_usertcode TYPE swncaggusertcode,
          wa           TYPE zusertcode,
          t_ut         TYPE STANDARD TABLE OF zusertcode,
          wa_result    TYPE zusertcode,
          t_result     TYPE STANDARD TABLE OF zusertcode.
    PARAMETER: month TYPE dats DEFAULT sy-datum.
    *PARAMETER: date TYPE dats.
    *select-options : username for wa_usertcode-account.
    START-OF-SELECTION.
    PERFORM get_data.
    PERFORM get_fieldcatalog.
      PERFORM set_layout.
    PERFORM get_event.
    PERFORM get_comment.
      PERFORM display_data.
    FORM get_data .
    *date = sy-datum - 2 .
    After start-of-selection add this line (parameter Month required 01 as day).
      concatenate month+0(6) '01' into month.
      CALL FUNCTION 'SWNC_COLLECTOR_GET_AGGREGATES'
        EXPORTING
          component     = 'TOTAL'
          ASSIGNDSYS    = 'DEV'
          periodtype    = 'M'
          periodstrt    = month
        TABLES
          usertcode     = t_usertcode
        EXCEPTIONS
          no_data_found = 1
          OTHERS        = 2.
      wa-date  = month.
    *wa-date  = date.
      wa-mandt = sy-mandt.
    wa_usertcode-account = username.
      LOOP AT t_usertcode INTO wa_usertcode.
        wa-user = wa_usertcode-account.
        IF wa_usertcode-entry_id+72 = 'T'.
          wa-tcode  = wa_usertcode-entry_id.
          wa-report = space.
        ELSE.
          wa-tcode  = space.
          wa-report = wa_usertcode-entry_id.
        ENDIF.
        COLLECT wa INTO t_ut.
      ENDLOOP.
      SORT t_ut BY report ASCENDING.
      CLEAR: wa, wa_result.
    endform.
    FORM get_fieldcatalog .
    fcat-tabname     = 't_ut'.
    fcat-fieldname   = 'DATE'.
    fcat-seltext_l   = 'Date'.
    fcat-key         = 'X'.
    APPEND fcat.
      CLEAR fcat.
      fcat-tabname     = 't_ut'.
      fcat-fieldname   = 'MANDT'.
      fcat-seltext_l   = 'Client'.
      fcat-key         = 'X'.
      APPEND fcat.
      CLEAR fcat.
      fcat-tabname     = 't_ut'.
      fcat-fieldname   = 'USER'.
      fcat-seltext_l   = 'User Name'.
      fcat-key         = 'X'.
      APPEND fcat.
      CLEAR fcat.
      fcat-tabname     = 't_ut'.
      fcat-fieldname   = 'TCODE'.
      fcat-seltext_l   = 'Transaction Code'.
      fcat-key         = 'X'.
      APPEND fcat.
    ENDFORM.
    *&      Form  SET_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM set_layout .
      layout-colwidth_optimize = 'X'.
    ENDFORM.                    " SET_LAYOUT
    *&      Form  GET_EVENT
          text
    -->  p1        text
    <--  p2        text
    *FORM get_event .
    events-name = slis_ev_top_of_page.
    events-form = 'TOP_OF_PAGE'.
    APPEND events.
    *ENDFORM.                    " GET_EVENT
    **&      Form  GET_COMMENT
          text
    -->  p1        text
    <--  p2        text
    *FORM get_comment .
    DATA: text(30).
    text = 'Billing Report'.
    heading-typ = 'H'.
    heading-info = text.
    APPEND heading.
    *ENDFORM.                    " GET_COMMENT
    **&      Form  top_of_page
          text
    -->  p1        text
    <--  p2        text
    *FORM top_of_page .
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         it_list_commentary       = heading[]
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    *ENDFORM.                    " top_of_page
    *&      Form  DISPLAY_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM display_data .
      sort t_ut[].
    DELETE ADJACENT DUPLICATES FROM t_ut[] COMPARING ALL FIELDS.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-cprog
          is_layout          = layout
          it_fieldcat        = fcat[]
          i_save             = 'A'
          is_variant         = variant
          it_events          = events[]
        TABLES
          t_outtab           = t_ut
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " DISPLAY_DATA

  • How to find out the "manufacture date"?

    Hello!
    Can you tell me how to find out the manufacture date of my Satellite A110-334 with the serial "SY6224123K"?
    I need this information for my insurance!
    I found only this link for HDD`s: http://www.storage.toshiba.eu/index_manual.php?pid=220&sid=536&la=en
    But there is no "S" on the first digit!??
    So it is maybe "Y6" which can be November 2006! Is this right?
    Thank you!
    ===========
    This is the information on the link above:
    How to encode a Toshiba Hard Disk Drive Serial Number?
    The Toshiba serial number (S/N) includes details of the date of manufacture. The first digit of the serial number indicates the Month of manufacture and the 2nd digit indicates the Year.
    Example:
    M Y x x x x x x x
    M = Month
    Y = Year
    The month digit goes from 1, for January, through to 9, for September, and then X, Y and Z, for October, November and December.
    Examples:
    2 8 1 7 0 0 0 1 A
    2 = February
    8 = 1998
    3 0 5 4 4 3 0 6 T
    3 = March
    0 = 2000
    X 9 D 7 8 3 3 1 T
    X = October
    9 = 1999
    The remaining digits contain information about factory and production line, and some digits are reserved for a continuously running serial number.

    Hello
    Try with http://gedb.toshiba.com/
    Let me know if you find info you need.

  • How to find out the max mem can be allocatedTT for 32 bit Win ?

    How to find out the maximum Permanent Data Size and Temporary Data Size that can be allocated for the Oracle Times Ten for 32 bit Windows OS.

    Hi Chris,
    Am I write in saying that this also depends on shared memory setting as well?
    If that is the case, on a platform like window 2003 32-bit, one cannot have more than 4GB of shared memory. Windows Server 2003 includes support for a startup switch (entered in the boot.ini file) that allows the allocation of memory and memory address space. Regardless of the amount of physical memory that is installed on the system, the operating system uses a virtual address space of 4 GB. Out of that amount, by default, 2 GB is allocated to user-mode processes (for example, Oracle or TimesTen) and 2 GB is allocated to kernel-mode processes (for example the operating system and others). In a nutshell on systems that have more than 1 GB of RAM, this startup switch can be used to allocate more memory to applications (3 GB) and less memory to the operating system (1 GB). However, adding adding the /3GB switch to the boot.ini file will not increase the amount of physical RAM memory, the 3GB switch just tells the computer to allocate the existing memory space differently.
    For a 32-bit TimesTen the limit on memory cannot be more than 2GB (PermSize+TempSize). For example on Linux 32-bit I have 1024MB and 512MB for these two parameters.
    Thanks,
    Mich

  • How to find out the selected item in the lsit

    Hi all,
    How to find out the selected item in the list,can any please post some examples which easy to understand,because iam not a good programmer

    This sample program uses a checkbox as selection,  you could also use a HOTSPOT.
    report zrich_0002 no standard page heading.
    data: imara type table of mara with header line.
    data: check_box(1) type c,  
       report_lines type i.
    start-of-selection.
    * Create the gui status with BACK button in standard place
    * and a READ button in the application toolbar
      set pf-status 'CHECK'. 
    select * into corresponding fields of table imara           from mara up to 100 rows.
    loop at imara.   
    write:/ check_box as checkbox, imara-matnr, imara-matkl.  
    hide imara-matnr. 
    endloop.
      report_lines  = sy-linno - 1.
    top-of-page. 
    write: 'List of materials'.  uline.
    top-of-page during line-selection.  write:  'Material.....'.  uline.
    at user-command. 
    case sy-ucomm.  
    when 'READ'.   
      check_box = space.    
    set pf-status 'CHECK' excluding 'READ'.
          do report_lines times.       
    read line sy-index field value check_box.    
       if check_box = 'X'.        
    write:/  'You have selected material',
    imara-matnr.       
    endif.   
      enddo. 
    endcase.
    Regards,
    Rich Heilman

  • How to find out the failed reorg tables during reorgnization phase

    Dear All,
      I am doing the archiving project.
      I have finished the Write phase and Delete Phase.
      Now I am doing the tablespace(PSAPSR3) reorganization in QAS(Offline).
      Due to the redo log space was full during the reorgnization phase.
      Some tables' reorgnization progress were failed.
      Hope you could tell me how to find out the tables which reorgnization were failed.
      (DB level?  OS level? SAP Level?)
    Thank you in advance!
    Jason

    /oracle/QAS/sapreorg

  • How to find out the user-exits?

    hi.
    how to find out the user-exits?
    regards
    eswar.

    Hi,
    *& Report  ZEXITFINDER
    *report  zexitfinder.
    *& Enter the transaction code that you want to search through in order
    *& to find which Standard SAP User Exits exists.
    *& Tables
    tables : tstc, "SAP Transaction Codes
    tadir, "Directory of Repository Objects
    modsapt, "SAP Enhancements - Short Texts
    modact, "Modifications
    trdir, "System table TRDIR
    tfdir, "Function Module
    enlfdir, "Additional Attributes for Function Modules
    tstct. "Transaction Code Texts
    *& Variables
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    *& Selection Screen Parameters
    selection-screen begin of block a01 with frame title text-001.
    selection-screen skip.
    parameters : p_tcode like tstc-tcode obligatory.
    selection-screen skip.
    selection-screen end of block a01.
    *& Start of main program
    start-of-selection.
    Validate Transaction Code
    select single * from tstc
    where tcode eq p_tcode.
    Find Repository Objects for transaction code
    if sy-subrc eq 0.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir
    where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir
    where pname = tstc-pgmna.
    select single * from enlfdir
    where funcname = tfdir-funcname.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name = enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    Find SAP Modifactions
    select * from tadir
    into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct
    where sprsl eq sy-langu
    and tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    Take the user to SMOD for the Exit that was selected.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    call transaction 'SMOD' and skip first screen.
    Regards

  • How to find out the person who did a transport.

    How to find out the person who did a transport.
    There are 3 basis admins in our Org.
    so is there a way of tracing out , who did what transport.
    Regards,

    - Goto import Overview (STMS)
    - Import Queue
    - Select DEV req (goto Import History)
    - Edit - Display More
    It will show the user who did the transport
    Rgds

  • How to find out the user who has created  a new field in the custom table.

    How to find out the user details who has created  a new field in the custom table.
    Thanks,
    Joan

    Hi Jesudasan ,
    You can know the user details with version management.Please find the
    below procedure to know.
    Go to table->Utilities tab->version->Version management->Compare the previous one .
    Hope this solves the issue,Let me know if you have any issues.
    Thanks,
    Rajani

  • How to find out the selected column in Table Control

    Hi all,
          How to find out the selected column in Table Control?
    Thanks & Regards,
    YJR

    Hi,
    Let your table control name in Screen painter be TC1.
    READ TABLE TC1-COLS INTO WA_COLS (some wok area)
                 WITH KEY SELECTED = 'X'.
            IF SY-SUBRC = 0.
              CLEAR: W_DUMMY, W_COL_NAME.
              SPLIT WA_COLS-SCREEN-NAME AT '-' INTO W_DUMMY
                                                   W_COL_NAME.
            endif.
    W_COL_NAME gives you the column name.
    Hope it helps.
    cheers
    sharmistha

  • How to find out  the selected line in list

    Hi all,
    Can any one tell me how to find out the selected event in the list

    Your subject said 'selected <b>line</b> in list' and your description says 'selected <b>event</b> in the list'. Which one is it you want to know?
    For line you will use the event AT LINE-SELECTION and for event you will use AT USER-COMMAND.
    Please reward and close if answered, if not, please revert back to the forum with more details.
    Thanks,
    Srinivas

  • How to find out the users currently logged into ODI

    Hi all,
    How to find out the users currently logged into ODI Work Repository?
    Thanks.

    Hi,
    It stores all the final queries in work rep table i.e "SNP_SESS_TXT_LOG" and the column is "TXT".
    Here u can find all the ODI bkp process queries.Pls specify the SESS_NO for purtivular task u want to check which u can get this in ODI operator.
    I dont think so that it will keep the substituted value(because its implicit and temporary process) but it will keep all the default values in the table SNP_VAR_SESS and the column is "DEF_V".
    Thanks,
    katukota

Maybe you are looking for

  • Samsung note II, known issue of aol mail not being received on phone

    I spent hours on the phone with Customer Service this past Wednesday & Thursday because my aol mail is not being received on my new phone. I just did some research online, and found out this has been an issue with AOL and Verizon since December 2012.

  • I got a Bookmark bar without Bookmarks! How can I see them?

    <blockquote>Locking duplicate thread.<br> Please continue here: [/questions/817046]</blockquote><br> I installed the new firefox. I realy like it. But there is one thing. I have my bookmark bar on. But there are no bookmarks on it :( Is there anyway

  • Cannot not submit pdf form by lotus suite

    1. our client said that cannot submit the form by lotus suite. 2. how can I set to submit the form by desktop mail only & at least ver. 7.0 or later. tks

  • I cannot see my plugins and add-ons. I want to activate one of them.

    <blockquote>Locking duplicate thread.<br> Please continue here: [/questions/762411]</blockquote><br> I recently downloaded and installed Stop Autoplay 1.0. I want to see all my plugins and add-ons but I don't see a button to make them appear. Please

  • How to import images into BLOB datatypes

    Dear All, I'm trying to import image into BLOB table type.I'm executing this SQL commands but found error. ORA-22288 ORA-06512 Please help me i'll be thank full. Regards FAHEEM LATIF CREATE OR REPLACE DIRECTORY images AS 'C:\IMAGES'; CREATE TABLE tes