Getting the log files from client using java program

hi
this is lalita...and i am doing a project in networking.... i am new to socket programming....i have established the socket connection between the client and server...with this site members' help....now i have to get the log files of the client system from the server.... via the created socket....i need it by tomorrow...i.e apr 12th ....as i have to show it to my guide...
i just need a core java program that will get the log information of the client from the server......
Can anybody please help me in this regard..... it would be of great help to me and my group....
Anxiously awaiting for the replies....
Thanking you and regards...
Lalita.

Simple.
Server is listening on a specific port for the connection from the clients.
Connect the client with the server on the above mentioned port.
Open the streams on both side for the connection and run in separate thread.
Define a protocol for communication between client and server.
e.g after connection with the server the server send a text message to the client (send log) now the client first should the log file name and size to the sever and then send the file. the server should save the file.
then disconnect the client or want to get another file or for other tasks define the other commands

Similar Messages

  • Unable to locate existing  file from unix using java program

    Hi
    I have created a file in unix using java program, file.createNewFile();
    And when i try to search for the same file using file.exists() it is returning false. Paths are correct. Can anybody help me out.
    Thanks & Regards,
    Prasanth

    In Linux FC5 using JDK1.6, this code         File temp = new File(System.getProperty("user.home") + "/abcdefghijklmn");
            System.out.println(temp.createNewFile());prints 'true' and the file is created with length zero.

  • How to view file from vss using java Commandline

    Hi To ALL,
    I wanted to view a file from vss through java code.
    By using the folowing code,i could able to get vss file in to local folder.
    Runtime.getRuntime().exec
    ("cmd /c ss Get $/Mywork/Myfile.java -GLC:/New");
    But i wanted to view file from vss using java code.
    any one please help me..
    Thanks in advance.........

    As always, Google is your friend.
    Follow the bouncing link.
    http://www.google.com/search?hl=en&q=VisualSourceSafe+%2B+Java+API
    PS.

  • Is there a way to automatically collect the log files from a AirPort or TimeCapsule base station?

    Hi there,
    the headline says basically all: Is there a way to collect the log files from a Time Capsule 7 AirPort from time to time? They are overwritten quite soon but I want a complete log of all activities to my access point.
    The AirPort Utility says something about SNMP. Is this the way to go? Some kind of demon on my Mac that retrieves and saves the logs like every two days?
    I want to copy the access logs, I am not interested in Time Machine backup logs.
    Thanks.

    There is a way to do this via Syslog. On the Logging & Statistics panel (within the AirPort Utility), you can point the AirPort's system logs to a Syslog "server."
    This would require a "dedicated" network client to receive the logs.
    Unfortunately, setting up a Syslog server is a bit intensive initially, but is simple to operate and maintain.
    Please check out this Apple Support Communities thread: Directing Syslog message to a file
    ref: Enable an Apple Mac OS machine as a syslog server

  • Help me out to get the jar files for FileUpload using MyFaces.

    hi,
    Can anyone help to get the jar files for FileUpload using MyFaces.
    I want myfaces-extensions.jar and commons-fileupload-1.0.jar.
    Thank you.

    you can't control the speed of a for-loop.
    you can remove your code from a for-loop and use a function to execute the code in your for-loop and you control how frequently you call the function.

  • I can not get any updates and therefor not use Java as it only run updates for Mac 10.7. and later? How do i get the updates to install and use Java?

    I can not get ny updates and therefore not use Java, as it only run updates for MAC 10.7. and later. How do i get the updates to install and use JAVA ?

    In Snow Leopard you update Java from Software Update (in the Apple menu). You can check your version by opening Terminal and typing
    java -version
    (don't get creative and type anything else)
    The latest version is 1.6.0_65.

  • Find the log files from EIM?

    Please, tell me where I can find the log files from EIM.
    I have already checked the directory /siebel/siebsrvr/log but the files there are old.
    Regards, Slavi

    You need to configure the log level and events for the EIM component.
    You can go to Administration Server Configuration > Servers and choose the EIM Component.
    Good Luck.
    Antonio
    BExpert, Brazil

  • I can't able to open the *.log files from the firefox browser and i need to open the file inside the frame

    If i open the log file from firefox browser it is not open and throws an error as
    "The address wasn't understood
    Firefox doesn't know how to open this address, because one of the following protocols (e) isn't associated with any program or is not allowed in this context."

    What type of log file?
    What is the file name?
    What is the file path or URI?

  • How to extract .sit files(in MAC)  using java program

    Hi,
    please help me , i want to simple program for
    " how to extract .sit files(in MAC) using java program"
    that sit files same as zip files in windows..[                                                                                                                                                                                                                                                                                                                                   

    Thanks for reply...
    but i search in the google about this topic...there is no results will appear..
    the problem is "i have to run program in the MacOS like extract all the
    .sit(StuffIt) extension files. These sit files same as zip files in the windows... we have one tool called StuffIt Expander but it is 3rd party tool. but here requirement is i have to write my own program to extract all the files same as zip file program...
    please do the needful..i am waiting for ur reply,,,

  • How to get the erroe message, if i run java program using .bat file

    Hi,
    I have a java file which accepts two inputs as command line argument. I want to make this pgm a tool. So have created a *.bat file which has the following command
    java myprogram arg1 arg2
    I'm gonna share this program with others. So i'll keep the class file and the .bat file in a commaon folder. All the users have to do is, edit the .bat file to give his/her args and run the .bat file. The pbm is, if the user input is not valid, I have put displays in the pgm to show it.
    But if i run thru .bat, I'm not getting the error message or I don't know where it is getting displayed.
    Can anyone help me with this ?
    Thanks,
    Mary

    When i run from the console, I can see the output.
    But, when i double click on the .bat file from the
    folder, it runs fine and i couldn't see the output.
    nullThat's because the error message is printed, and then the console is closed. The message is there but you need to read really really fast :)

  • DBMS_DATAPUMP; how to get the log file of a job?

    Hi
    I want the user to be able to see the logfile of his job from another session.
    this is my procedure
    create or replace procedure get_job_log (p_job_name IN varchar2 )
    is
    hdl_job  number;
    l_job_state     VARCHAR2 (20);
    l_status        sys.ku$_Status1010;
    l_job_status    sys.ku$_JobStatus1010;
    l_job_logentry sys.ku$_LogEntry1010;
    l_job_logline  sys.ku$_LogLine1010;
    begin
    hdl_job := DBMS_DATAPUMP.ATTACH(
                                         job_name   => p_job_name
                                        ,job_owner  => 'CLONE_USER'
    DBMS_DATAPUMP.GET_STATUS(
       handle  => hdl_job
       ,mask   => dbms_datapump.ku$_status_job_error + dbms_datapump.ku$_status_job_status + dbms_datapump.ku$_status_wip
       --,timeout   => 15
       ,job_state =>l_job_state
       ,status    =>l_status);
    l_job_logentry:=l_status.wip ;
    for x in l_job_logentry.first .. l_job_logentry.last loop
       dbms_output.put_line (l_job_logentry(x).LogText) ;
    end loop;
    dbms_datapump.detach(hdl_job);
    end;
    /when I run it for the first time, it works... kindof...
    but my problem is that if I try running it again I get:
    ORA-31626: job does not exist
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 902
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 3407
    if I close sqlplus session , open new one and run - it works. So what is the issue here? Is detach not enough? What else should I do?
    my version is 11.1.0.6
    UPDATE.
    Looks like the above is not true. It doesn't error if it runs to the end of code... The problem seems to happen only when exception occures and .detach is not called. So this is not an issue anymore.
    But I still don't get a decent performance from the .get_status function. Sometimes it just hangs and errors on timeout.
    Still the question is: How can I get the LOG of the session using DBMS_DATAPUMP from another session and output it on the screen?...
    Edited by: Andrei Kübar on Dec 23, 2011 12:44 PM
    Edited by: Andrei Kübar on Dec 23, 2011 12:57 PM

    I believe I found a solution
    I am now running the above code only 1 time but in a loop and inserting output into a table, so that user can query the table and see where the job is
    here's the code I'm using (partially copied from http://psoug.org/reference/dbms_datapump.html)
    l_job_state:='UNDEFINED';
    while (l_job_state != 'COMPLETED') and (l_job_state != 'STOPPED') loop
         DBMS_DATAPUMP.GET_STATUS(
            handle  => hdl_job
           ,mask   => dbms_datapump.ku$_status_job_error + dbms_datapump.ku$_status_job_status + dbms_datapump.ku$_status_wip
         --,timeout   => 15
           ,job_state =>l_job_state
           ,status    =>l_status);
         if (bitand(l_status.mask,dbms_datapump.ku$_status_wip) != 0) then
           l_job_logentry:=l_status.wip ;
           if (l_job_logentry is not null) then
                for x in l_job_logentry.first .. l_job_logentry.last loop
                    --dbms_output.put_line (l_job_logentry(x).LogText ) ;
                    writelog (l_job_logentry(x).LogText );
                end loop;
           end if;
         end if;
         if (bitand(l_status.mask,dbms_datapump.ku$_status_job_error) != 0) then
            l_job_error :=l_status.error ;
            if  (l_job_error is not null) then
                for x in l_job_error.first .. l_job_error.last loop
                    dbms_output.put_line (l_job_error(x).LogText) ;
                    writelog('Error: '|| l_job_error(x).LogText) ;
                end loop;
            end if;
         end if;
         --dbms_output.put_line ('Current job state: '||l_job_state);
         writelog ('Current job state: '||l_job_state);
    end loop;thanks all for your help

  • Unable to load the flat file  from client  work station

    Hi,
    I am trying load a flat file (.CSV file)from my desktop (Client work station) and getting the following error.
    An upload from the client workstation in the background is not possible
    Message no. RSM860
    Diagnosis
    You cannot load data from the client workstation in the background.
    Procedure
    Transfer your data to the application server and load it from there.
    I have recd a .XLS file and then I have converted to .CSV file , which I saved in my desktop and trying to load the same.
    Please help me how to go about this?...
    Thanks in advance.
    Christy.

    Hi All,
    Again, I have tried to load the flat file from clint work station with direct loading..I have got the following errors..
    Errors : 1
    Record                                                  990: Contents '50,000' from Field /BIC/ZPLQTY_B Not Convertible in Type QUAN -> Long Tex
    like this i recd so many errors.
    ERROR : 2
    Error in an arithmetic operation in record 259     
    Please help me how to load the flat file successfully.
    If I hv to save the flat file in Appl server..how to do that..Please provide step by step instruction..
    Thanks
    Christy

  • How to use .dbf files zipped into a .zip file from within a java program

    i have a .zip file containing several .dbf files.
    the zip file is automatically downloaded regularly and data from the .dbf files is inserted into the database.
    how do i facilitate automatic extraction of a zip file or how do i fetch data from the .dbf file? (this cannot be done manually)
    anu.

    you could write a little polling class checking the zip file. you can use the java.util.jar package to extract the zip file (http://java.sun.com/docs/books/tutorial/jar/api/index.html). you could also use Jakarta ant (http://ant.apache.org/manual/index.html) to do this job (core task "zip") and call ant's target file on a regular basis (dependend on the OS you use, you can set os tasks/schedules).

  • Can i get the data file from the cube

    Hi All,
    Previously I created and activated one cube using one data file, by mistake lost that data file. Is there any chance to get that data file from that Cube?
    Thanks
    Bhaskar

    Hi Paul,
    yes you can..
    1) If you have loaded through  PSA , Then goto that PSA table and from settings menu> change display variants-> view tab> view as Excel> then save this file
    2) If you have not used PSA.then use LISTCUBE to view the data and change settings to excel and download..
    Don't forget to assign points,If it is useful..
    Further queries always welocme..
    Regards.
    Pradeep choudhari

  • How to get the EXCEL file from web site (b2b) into SAP system?

    Hi Guys,
    I have a requirement of saving the excel file that has been send to SAP system from a B2B site.
    Currently there is a call to the SAP system from the B2B site via an RFC function ,this RFC functions gets the excel file as an input to the SAP system,i need to store this Excel file in the SAP  (as an excel file itself).
    How can i acheive this?
    Please suggest.
    Thanks ,
    Swati

    You can extract a date portion and  assign to the variable and then compare with GETDATE()
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for

  • Legacy flat file - XI - R/3 (IDocs)

    Hi Liu, I was trying to have some hands-on with XI 3.0 demo. I tried with the following scenario- Legacy flat file -> XI -> R/3 (IDocs) e.g., say to create BOM data or material Master. I take the flat file - create my own External Data Type, message

  • Select from table without specifying the column list.

    I want to reference the columns in select list without specifing the column name of a table. For example i am having a table called emp(id number,name varchar2(30)). I want to write a query which will display the name of the employees. But i don't wa

  • Hierarchy of a node

    hi guys, please any one would like to let me know is there a way to get to know about all possible elements and attributes of a root without visualizing them. In case if we have a large xml file then it is very hard to pick all possible elements. For

  • Nokia Lumia 800 Strange Behavior

    Hi all, I do have problem, often my lumia it seems on and fully working but it is impossible to receive call, it is enough to touch a button and all come back to work normally. This is really annoying, Any idea what will be the reason? Phone is updat

  • Report row check and browser refresh

    I've selected some rows in a region report with the checkbox column. After refreshing the page in the browser the marking is still there on those rows. How can I make it disappear automatically on refresh?