monitoring

Determining query's progress (Oracle PL/SQL)

守給你的承諾、 提交于 2019-11-27 21:20:01
问题 I am a developer on a web app that uses an Oracle database. However, often the UI will trigger database operations that take a while to process. As a result, the client would like a progress bar when these situations occur. I recently discovered that I can query V$SESSION_LONGOPS from a second connection, and this is great, but it only works on operations that take longer than 6 seconds. This means that I can't update the progress bar in the UI until 6 seconds has passed. I've done research

Android Emulator: How can I get a list of services that are running

只谈情不闲聊 提交于 2019-11-27 20:22:52
问题 I have the Android Emulator running in my Ubuntu VM and just installed an apk file trough the console. The emulator and adb have many options to view what is going on on the device. But how can I get a list of services that are currently running? I'm trying to find out if a specific app installes a notify service to view (unwanted) ads. I even know the services' name. PS.: I'm an advanced beginner - but not advanced enough. So thanks for your help. 回答1: You can get the list with the following

monitoring for changes in file(s) in real time

半城伤御伤魂 提交于 2019-11-27 18:24:36
I have a program that monitors certain files for change. As soon as the file gets updated, the file is processed. So far I've come up with this general approach of handing "real time analysis" in R. I was hoping you guys have other approaches. Maybe we can discuss their advantages/disadvantages. monitor <- TRUE start.state <- file.info$mtime # modification time of the file when initiating while(monitor) { change.state <- file.info$mtime if(start.state < change.state) { #process } else { print("Nothing new.") } Sys.sleep(sleep.time) } Similar to the suggestion to use a system API, this can be

Monitor when an exe is launched

浪尽此生 提交于 2019-11-27 18:12:07
I have some services that an application needs running in order for some of the app's features to work. I would like to enable the option to only start the external Windows services to initialize after the application is launched. (as opposed to having them start automatically with the machine and take up memory when the application is not needed) I do not have access to the exe's code to implement this, so ideally I would like to write a C# .Net Windows service that would monitor when an exe is launched. What I've found so far is the System.IO.FileSystemEventHandler. This component only

How to monitor a complete directory tree for changes in Linux?

守給你的承諾、 提交于 2019-11-27 18:06:23
How can I monitor a whole directory tree for changes in Linux ( ext3 file system)? Currently the directory contains about half a million files in about 3,000 subdirectories , organized in three directory levels. Those are mostly small files (< 1kb, some few up to 100 kb). It's a sort of queue and I need to know when files are being created, deleted or their content modified within 5-10 seconds of that happening. I know there is inotify and sorts, but AFAIK they only monitor a single directory, which means I would need 3,000 inotify handles in my case - more than the usual 1024 handles allowed

How to detect using c# if a pendrive is plugged into a USB port?

大城市里の小女人 提交于 2019-11-27 18:03:09
Is there a way to find out when in a LAN anyone plugs in a pendrive to the USB port? Programatically (in C# preferably) or through some tool. Basically I'd imagine a client application sits on each terminal and monitors the USB ports and sends the information to the server. a.) Can I get the details of the file(s) being copied? b.) Is there a way to do this without a client application? EDIT I dont want to disable the USB port entirely. its to be on a need to have basis. Basically just want the users on the LAN to share data responsibly and know that whatever data is tranfered is monitored and

Best way to aggregate multiple log files from several servers [closed]

a 夏天 提交于 2019-11-27 17:42:15
I need a simple way to monitor multiple text log files distributed over a number of HP-UX servers. They are a mix of text and XML log files from several distributed legacy systems. Currently we just ssh to the servers and use tail -f and grep , but that doesn't scale when you have many logs to keep track of. Since the logs are in different formats and just files in folders (automatically rotated when they reach a certain size) I need to both collect them remotely and parse each one differently. My initial thought was to make a simple daemon process that I can run on each server using a custom

CPU utilization by database?

断了今生、忘了曾经 提交于 2019-11-27 17:06:58
Is it possible to get a breakdown of CPU utilization by database ? I'm ideally looking for a Task Manager type interface for SQL server, but instead of looking at the CPU utilization of each PID (like taskmgr ) or each SPID (like spwho2k5 ), I want to view the total CPU utilization of each database. Assume a single SQL instance. I realize that tools could be written to collect this data and report on it, but I'm wondering if there is any tool that lets me see a live view of which databases are contributing most to the sqlservr.exe CPU load. Sort of. Check this query out: SELECT total_worker

Sidecar containers in Kubernetes Jobs?

删除回忆录丶 提交于 2019-11-27 15:39:04
问题 We use Kubernetes Job s for a lot of batch computing here and I'd like to instrument each Job with a monitoring sidecar to update a centralized tracking system with the progress of a job. The only problem is, I can't figure out what the semantics are (or are supposed to be) of multiple containers in a job. I gave it a shot anyways (with an alpine sidecar that printed "hello" every 1 sec) and after my main task completed, the Job s are considered Successful and the kubectl get pods in

Measuring Java execution time, memory usage and CPU load for a code segment

余生长醉 提交于 2019-11-27 06:59:30
For a particular segment of Java code, I'd like to measure: Execution time (most likely thread execution time ) Memory usage CPU load (specifically attributable to the code segment) I'm a relative Java novice and am not familiar with how this might be achieved. I've been referred to JMX , however I'm not sure how that might be used, and JMX looks a bit 'heavy' for what I'm looking to do. Ideally I'd like some measurement class that can be told what I would like to measure, with the option of calling a start() method prior to a code segment and a stop() method after. Relevant metrics would be