Monitor a process progress - JProgressBar
Hello all,
I have a method that runs a process:
public Process EXECUTE(String command) {
try {
return Runtime.getRuntime().exec(command);
catch(IOException ioe){
return null;
and a process that represents a call to this method:
Process proc;
proc = EXECUTE("notepad text.txt");
proc.waitFor();
I want to monitor in some way the progress of the process(i.e. when it is a large text file and it takes time to open) and at the same time the system must waitFor() it to complete before moving on to the following code.The final objective is to monitor this with a JProgressBar
Any help is welcome
Thanks in advance
This may help
http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html
Similar Messages
-
How to monitor .exe excute progress
Hi, My friends~
I have a java application that call .exe win32 Application to do some work. But .exe inital and execute in Background . this process cost a lot of time. Do someone know how to use ProgressBar and ProgressMonitor monitor this process??Wait for some suggestion~~~I hope that as well as waiting for the solution, you are researching for yourself?
Obviously, you can't monitor the process directly (it's another process), but you can see its output. If the exe provides progress output you can capture that, parse it, and use it to update a JProgressBar. For example (without exception handling or boilerplate code):
//Set the process running
String cmd = "myexec --verbose";
Process p = Runtime.getRuntime().exec(cmd);
//Capture the output
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
//Read the output and extract any progress info
String line = "";
while ((line = in.readLine()) != null) {
int progress = myParseProgress(line);
updateProgress(progress);
// and so on.../k1 -
How to monitor mavericks download progress
How do I monitor Mavericks download progress? I have clicked it several times while downloading and I am not sure if I have restarted the process or not - It has been 90 minutes and still says downloading. Do I need to restart?
Thanks Mende;
I can see incremental blue line movement (1 third downloaded) under the X icon in my tray however when I go to the apps store for purchases....The gray box says Download...very confusing - it has been 2 hrs since I rebooted and started over. I am afraid to hit the download tab in purchases - but - 2 hrs for 5 gb? Should I wait it out? -
Monitoring BI PROCESS CHAIN with Solution Manager BPMON
Hello,
I'm trying to setup the monitoring of BI process chain using the BPMON
I setup the process chain monitoring using BPmon application monitoring "BI Process Chain Monitoring" (BOBIPCMO)
but than I'm not able to read the process chain names,steps,and variant from satellite system
On other systems,using different application monitor (like PI MONITOR) is working fine
i'm using the latest plug-in ST-A/PI 01L_BCO700 on entire landscape
My bi system is 7.01 EHP1 sp4
solution Manager is 7.01 EHP1 SP20
Any suggestiions?
Thanks
MarcoHello Marco,
the problem is that the Process Chain monitor is not yet available with ST-A/PI 01L*. Unfortunately the empty hull that you see during the setup was shipped without the proper content. The Process Chain monitor will be properly shipped with the next ST-PI and ST-A/PI combination in Q2/2010.
Sorry for any inconvenience caused.
If you want to have this monitor earlier on it could be implemented via Customer Exit in case that you have some MaxAttention or Safeguarding engagement.
Best Regards
Volker -
How to monitor RFC processing in XI
Hi Friends,
In the IDoc to RFC scenario please tell me How to monitor RFC processing in XI..
Thanks and Regards
SriSri,
You can monitor in SXI_MONITOR/SXMB_MONI. If its Syncronous then u can see the request and response messages in the above mentioned transaction.
To get more details you can go for RWB and select ur message and check for audit log's.
Best regards,
raj. -
Monitor Integration process log in BPM
Hi
I am practising the following BPM
/people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm
and I wanted to know how to monitor integration process log in BPM.
To monitor Integration process I logged, into transaction SXMB_MONI_BPE ->Process Selection->Selected corresponding integration process (in Service Field) - and Clicked Execute as suggested in the blog
But I get the message work item doesn't exist ??
What do I need to do in this case ??
Thanks,
KiranSAKHARDANDE ,
Go to sxmb_moni-->Monitor for processed xml message --> In the view box there is standard and process. Select Process for checking the messages of BPM.
Else as in the weblog mentioned go to SXMB_MONI_BPE ->Process Selection->Select corresponding integration process (in Service Field) ->Execute->Select work item. Select your service which you have used in ID.
If you dont find anything then first see whether you see your message in sxmb_moni or not? If not then check your file sender communicaiton channel in adapter monitoring.
Regards,
---Satish -
Monitor all processes EXCEPT _Total
Hi!
My goal is to monitor all processes on a given server, and raise an alert if memory usage (working set) exceeds 1 GB. I've tried the following: https:// sites.google.com/site/scomblogs/journal-blog/processperformancemonitoringinscom
The problem is that the instance _Total will always contain a value higher than 1 GB. I can't seem to figure out how to override this. Is it possible at all?Thanks a lot! The WMI link did the trick. My final script came out as follows:
On Error Resume Next
strComputer = "."
' Instantiate MOM API
Set objMOM = CreateObject("MOM.ScriptAPI")
Set ObjBag = objMOM.CreatePropertyBag()
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
("Select * from Win32_Process")
counter = 0
proc = ""
For Each objProcess in colProcesses
' 1 GB
wsetGb = objProcess.WorkingSetSize / 1073741824
'100 MB
' wsetGb = objProcess.WorkingSetSize / 104857600
IF (wsetGb > 1) THEN
usr = objProcess.GetOwner(strNameOfUser,strUserDomain)
counter = counter + 1
proc = proc + objProcess.Name +", owner: " +strUserDomain + " " + strNameOfUser +" cmd: " +objProcess.CommandLine
END IF
Next
IF (counter > 0) THEN
Call ObjBag.AddValue("State","Error")
Call ObjBag.AddValue("Culprit",proc)
Call ObjBag.AddValue("WorkingSetSizeInGb",wsetGb)
ELSE
Call ObjBag.AddValue("State","Ok")
Call ObjBag.AddValue("Culprit","None")
Call ObjBag.AddValue("WorkingSetSizeInGb","Not Applicable")
END IF
IF Err.Number <> 0 THEN
EH
END IF
Sub EH
Call ObjBag.AddValue("State","Warning")
Call ObjBag.AddValue("Culprit",Err.Source)
Call ObjBag.AddValue("Warning",Err.Description)
Err.Clear
End Sub
objMOM.AddItem(ObjBag)
Call objMOM.ReturnItems -
How to enable an monitor parallel processing in Oracle
Hi All,
I have 2 short questions:
1. When we want parallel processing, we can either use a parallel hint in the query, or alter a table to be parrallel. My question is what is the difference in the following 2 syntax:
a. ALTER TABLE myTable PARALLEL (DEGREE 3);
b. ALTER TABLE myTable PARALLEL 3;
Does the "DEGREE" keywor make any difference? or they both are same statements?
2. When we enable parallel processing, how can we monitor oracle processes, to confirm that a certain table is being actually processed by multiple threads of a singe user process?
An early response would be highly appreciated. Thanks.1)The parallel clause lets you change the default degree of parallelism for queries and DML on the table.
2) PARALLEL DEGREE specifies the number of query server processes that can scan the table in parallel. Either specify a positive integer or DEFAULT which signifies to use the initialization parameter
check further http://mywebsys.com/oracle/syntax/view_syntax.php?id=23
Thanks -
How to monitor parallel processing
Hi All,
I have 2 short questions:
1. When we want parallel processing, we can either use a parallel hing in the query, or alter a table to be parrallel. My question is what is the difference in the following 2 syntax:
a. ALTER TABLE myTable PARALLEL (DEGREE 3);
b. ALTER TABLE myTable PARALLEL 3;
Does the "DEGREE" keywor make any difference? or they both are same statements?
2. When we enable parallel processing, how can we monitor oracle processes, to confirm that a certain table is being actually processed by multiple threads of a singe user process?
An early response would be highly appreciated. Thanks.user566817 wrote:
2. When we enable parallel processing, how can we monitor oracle processes, to confirm that a certain table is being actually processed by multiple threads of a singe user process?There are a number of virtual performance views that can be used. Please refer to the Oracle® Database Reference guide for details on these.
Had a look though my scripts and I have this one.. cannot recall if I "borrowed" it from somewhere and customised it and how old it is.. but it should (hopefully) still be mostly correct. It uses the virtual view v$px_process to determine the list of current PQ slaves in the pool and if they are used, map them to the Oracle session using them.
select distinct
x.server_name as "PQ",
x.status as "Status",
x.sid as "OraPID",
w2.sid as "Parent OraPID",
v.osuser as "O/S User",
v.schemaname as "User",
w1.event as "Child Wait",
w2.event as "Parent Wait"
from v$px_process x,
v$lock l,
v$session v,
v$session_wait w1,
v$session_wait w2
where x.sid =! l.sid(+)
and to_number (substr(x.server_name,3)) = l.id2(+)
and x.sid = w1.sid(+)
and l.sid = w2.sid(+)
and x.sid = v.sid(+)
and nvl(l.type,'PS') = 'PS'Use at own risk - best would be to verify that this is still valid using the Reference Guide. Or create similar ones using the available V$ views for the details you want to see (e.g. SQL statement executed per PQ, etc). -
How BAM can use to monitor B2B process?
We have a BPEL process that is using B2B piece for connecting Trading partner and want to monitor whole process from Start of the BPEL to end of the B2B.
Here are the questions.
Q1. We know by using BAM sensor on BPEL process we can monitor the BPEL prcocess but how about B2B piece?
Q2. What are the best practices for capturing and reading transactional data in various phases and functional acknowledgement messages from a B2B server?
Thanks in advance for your reply.Please send a note to [email protected] for a document on BAM-B2B integration.
-
Process Monitoring: Monitor BI Process Chains
Hello,
does someone know how to monitor Bi process chains in SolMan Process Monitoring? I tried to add the chain CCMS node, but for some reason it does not accept the chain (I guess because it is a dynamic created CCMS context).
Regards,
FrankHi,
I will monitor one process with the name
pmd, but 4 processes match on these chracters. How
can i tell SMC that the Process Monitoring shows only
the process who exactly Match the entered value ?Have you tried the extra optional user and/or argument filtering?
If all 4 of your processes run as the same user, with the same arguments (or none at all) then you could also symlink a different file name to the binary you want so it appears in your ps output as something unique. That only works if you have control over what launches that process to begin with (so you can change it to call that new name as well).
If you still can't make that process unique you could also write a small script to monitor it and dump back the interesting bits to stdout to be read by ScriptRunner (http://www.halcyoninc.com/products/ScriptRunner/index.php)
Regards,
[email protected]
http://www.HalcyonInc.com -
Monitoring inbound processing and Sync/ Async communication on PI7.11
Hi All,
I am new to PI. We have following two requirements to be done on PI 7.11
1) Monitoring inbound processing (Txn Code SWF_INB_MON)
2) Monitoring Sync/ Async communication (Txn Code SXMS_SAMON)
Kindly let me know how should I proceed or what document should I follow or any scenario is to be configured.Hi,
1. Start inbound processing monitoring with transaction SWF_INB_MON or SWF_INB_ADM.
Note that you require administrator authorization for transaction SWF_INB_ADM
2. You can monitor the throughput of the inbound processing either on the basis of individual process system or system-wide. In this way you can display the throughput figures in any discrete time range, right down to seconds. A similar display for message packages allows you to monitor inbound processing with the same detail."
3. You can display runtime information about individual messages, for example, the total runtime of a message in inbound processing or just the runtime of a specific section of the inbound processing. For monitoring individual messages click on "Display Message Packages".
regards,
ganesh. -
Hi all,
Is there any way to monitor BPEL process. In Jdev there is tool call
HTTP analyzer but it only monitors process which are invoked from Jdev.
Like Java webservices can monitored via that tool. But i want to monitor BPEL
process. I want to see Http request message. It that possible.?
thanks a lot.
/mishitAny requests you want to monitor should be routed through obtunnel. So the webservice that calls your bpel process should use the url of the machine where obtunnel is located, and obtunnel should be configured with the details of the machine where the bpel process is located.
also, you may find this thread of interest How to capture SOAP message using TCP Monitor in JDev? -
Monitoring defunct process doesn't seem to work
adding a row in the process monitoring module with
name pattern "<defunct>"
doesn't matches any thing (Process count = 0)
where in fact, there is at least 10 on the host
how is this module suppose to work?
thanksHi Phler2,
Monitoring defunct process doesn't seem to work
adding a row in the process monitoring module with
name pattern "<defunct>"
doesn't matches any thing (Process count = 0)
where in fact, there is at least 10 on the host
how is this module suppose to work?I'm don't think the stock Process Monitoring module will pick up a defunct/zombie state. If you're just looking for raw zombie count it's in the SystemMonitor module:
http://www.halcyoninc.com/products/PlusPack/help/SystemMonitor/HALSolarisSystemAlert-process-h.html
...part of PlusPack (free 30-day eval):
http://www.halcyoninc.com/products/PlusPack/index.php
Regards,
[email protected]
http://www.HalcyonInc.com -
Can you monitor Mail download progress?
I am new to 10.4.4, and I miss the download progress of Mail in OSX 10.2.8.
Is there a way to monitor the download progress of Mail in 10.4.4? I am still on dialup and I would sure like to know what Mail is doing while I am online.
RegardsI asked the same question see, Mail Differnet under Tiger no OUT BOX. Allan Sampson answered and suggested this
"I'm not sure why but Apple also removed the progress bar with Tiger Mail.
You can send Apple feedback regarding the progress bar at the following link."
http://www.apple.com/macosx/feedback/
You, I, and others are finding a problem here. We must get as many people as possible to send feedback to apple to encourage this to be fixed.
Maybe you are looking for
-
How Do I update/refresh my Services View in the Panel ?
Hi, writing new cfcs and changing cfcs does not update the cfcs in the view of the service panel. And there is no update or refresh button. How can I update the view ?
-
Premiere Pro CC won't import XDCAM EX files from the Sony PMW200 or PMW150
I work for a company that recently upgraded to Premiere Pro CC from premiere Pro 6 after purchasing a Sony FS-7. This has worked great for viewing the files out of the FS-7, however I can no longer import the XDCAM EX files from our PMW200 camera tha
-
How do you change message type linked to partner in WE20?
Good Morning, May please have a piece of info about this subject: In we20 (partner Profiles) i can see that a partner of type LS (Logical System) has, as Outbound parameters, the CRMXIF_PARTNER_SAVE Message type. I want to change that to CRMXIF_PARTN
-
Video playback from PB17 to Sony TV firewire port ?
I'm wondering if it's possible to get video playback from my PowerBook 17 to a Sony HDTV firewire port ? I can't see in prefs where you can do this. Is there some software that enables this? I tried to select firewire playback from Final Cut Pro even
-
How to unregister a language.
Hi, We wrongly registered one language through OAM. Now we would like to unregister this language. Any ideas please? Thanks.