Directing fsck output to syslog and screen in real-time

Hello,
I have the following under Debian 6. The procedure should check and automatically repair the file system and write the result to the user's screen and also to syslog.
#!/bin/bash
output=`fsck -y /dev/disk/by-label/oracle-xe; retval=$?`
logger -is "$output"The procedure seems to work, but I don't see the output until the fsck command has completed. Is there a possibility to write the output to syslog while presenting the fsck output in real-time?
Kind regards.
Edited by: Dude on Jan 30, 2012 6:44 PM

I make some progress:
outfile=/tmp/`date +%N`
retfile=/tmp/`date +%N`
(fsck -y /dev/disk/by-label/oracle-xee; echo $? > $retfile) | tee $outfile
logger -i < $outfile
retval=`cat $retfile`
rm $outfile
rm $retfileThe above gives me the results I was looking for
I also tried
logger -is "`fsck -y /dev/disk/by-label/oracle-xee`"But it the syslog output in this case is just one long line of text without any newlines
If there is a better way, please let me know.
Edited by: Dude on Jan 30, 2012 6:57 PM

Similar Messages

  • Is it possible to set up my iPad as a video camera and broadcast it real time to a TV via apple TV?

    Is it possible to sey up my iPad as a video camera and broadcast it real time to a TV via Apple TV?

    Use airplay to send what is on the iPad to your tv.
    Since ipad2, you can display exactly what is on the ipad screento a tv via an adaper or via airplay through an apple TV.
    http://support.apple.com/kb/ht5209
    http://support.apple.com/kb/ht4437
    General overview but lacks specifics.
    http://accelerateyourmarketing.com/home-video-studio/
    Video
    https://www.youtube.com/watch?v=ce5FVJi0Uxw

  • TWO VERY TOUGH SUPPORT PROBLEMS FACED AND SOLVED IN REAL TIME

    pls any body post two very tough support problems faced and solved in real time.
    my id is: [email protected]

    Hi Priya.,
    For example client wants his customer legacy number in XD01 master data which is not there in Standard SAP.we can satisfy the requirement with USER EXIT
    2) If the client wants customer Phone number in the sales order we can use user exit to satify the requirement
    These are not provided in Standard SAP & we should work out on alternative way
    REWARD if helpfull
    Thanks & Regards
    Narayana

  • How to capture pc screen in real time?

    Hi, recently i have been asked to make a java program that captures the pc screen and shows it, in real time, either in the same pc or another pc over the local network. To do this program, i could easilly make one that takes multiple pics of the screen and shows them, but that would be very slow, so i was thinking of doing one that captures the video stream and shows it directly on the program. Problem is, how do i do it using Java? I have no idea, so if anyone can enlighten me on a way how to do it, i would be very thankful.
    on a side note, i have to make a new program, so i am not interested in another programs out there unless they java and open source for me to study.

    you would think i didnt need to post that huh? but in fact, i've looked around this forum to see if i find a solution and i saw not only once or twice, but a really large number of advertisements of programs u had to pay and were closed, in many different threads, so a little infatuation on the fact i didn't need one of those here seemed it would help :P
    thx for the answers, but neither of you focused on the real problem. First, i couldnt just plug the video board on another monitor because it would not be exactly what i need to do, i want the other monitor to be display its own computer system and have a manageable window in which it would show everything being done in the other computer, one i can open without having to mess with any cables. This application would be used in a ubiquitous project and messing with the cables wouldn't really fit in a ubiquitous description :P. I have tested sequenced screenshots, and it is indeed very slow, even in one pc showing the screen captures on itself, imagine over a network...
    altough it may sound premature, doing the program with screen captures seems to me to be entirelly different from doing it getting the feed directly from the video board, maybe with the exception of the little player window that would go with it. But once done, i would be more then happy to test it out and say which of the two would be better to send over the network.
    well, for what i understand, the first poster seems to say there is no way in doing it the way i was trying to do with java, so i'll probably have to get a C program to capture it then send to a java on via socket, but if anyone else out there would know anything that could help me, it would be greatly appreciated.

  • Green Screen keying real-time.

    Hello, my boss is starting to do some green screen work. Besides little low-budget comedy skits, I don't know a professional work flow for this.
    What tools (hardware/software) do I need to preview the green screen key while we are shooting. If I didn't word that correctly... While I'm shooting somebody in front of the green screen, how can I get a real-time preview of my background while shooting in real-time so I know the subject is in the right place and lit correctly.
    We'll purchase moderately prices solutions or rent pricey solutions.
    Thanks for your time!
    -Monty

    Veescope Live. $100.
    http://www.dvdxdv.com/NewFolderLookSite/VeeScope/Products/VeescopeLive.try.htm
    Shane

  • How to calculate rms voltage, rms current and frequency from real time data?

    Hello,
    I need to calculate the real time rms voltage, rms current and frequency of the received voltage and current graphs using visa read. Actually am trying to monitor the voltage and current parameters of AC load, in this case, am using a set of 4 light bulbs at the moment. Expected frequency is 50 Hz, and rms voltage close to 240v AC, current about 1A. 
    Attached is the vi picture of what I have been able to achieve so far, courtesy of labview forums. But I need to finally finish this vi by calculating the Vrms, Irms and frequecy. The front panel shows the voltage (Chart V) and current (Chart I) after scaling. Chart VI represents ADC value 0 ~ 1023 of received data. Aray V & I show the binary bits received up to 10 bits of useful data from ADC. Each sine wave from ADC is sampled at 25 samples for the ADC conversion, and sampling frequency of 1.28kH.
    I have tried using the RMS vi, but seems I don't know how to configure it correctly to get desired results. Also when I make changes like switching of one of the bulbs so that their is current change, I need to refresh the SERIAL port first before changes show up on the VI. Any ideas on how to improve on this are highly appreciated.
    Otherwise, I would appreciate if somebody helps me MODIFY my VI to read the rms values and frequency from received data. This is the last piece of my project, I do appreciate all the help rendered. Am currently using labview labview 2014, student version!
    Gavin.
    Attachments:
    Test_revised1.vi ‏39 KB
    Test_frontpanel.png ‏196 KB
    Test_blockdiagram.png ‏187 KB

    hello,
    note that peak voltage (Vpeak) is (240 * 1.414) = 399 V and peak current about 1.414 if intended rms current is 1A.
    Gavin.

  • Jerky and "Not In Real Time"

    Why is my footage in AF 5.5 jerky and why do I get a message in red saying"Not in Real Time"?
    Any ideas please?

    You're not giving us any information to work with to help you. We need to know a lot more to help you. Please provide answers to the questions listed here: "FAQ: What information should I provide when asking a question on this forum?"
    I'm going to take a guess, and I'm guessing that you are previewing by pressing the space bar. Don't do that. Use RAM preview to get real-time playback of previews.
    Start here to learn After Effects: http://adobe.ly/bjBT3P

  • Continuous data acquisition and analysis in real time

    Hi all,
    This is a VI for the continous acquisition of an ECG signal. As far as I understand the DAQmx Analog read VI needs to be placed inside a while loop so it can acquire the data continously, I need to perform filtering and analysis of the waveform in real time. The way I set up the block diagram means that the data stays int the while loop, and as far as I know the data will be transfered out through the data tunnels once the loop finishes executing, clearly this is not real time data processing. 
    The only way I can think of fixing this problem is by placing another while loop that covers the filtering the stage VIs and using some sort of shift registeing to pass the data to the second loop. My questions is whether or not this would introduce some sort of delay, and wether or not this would be considered to be real time processing. Would it be better to place all the VIs (aquicition and filtering) inside one while loop? or is this bad programming practice. Other functions that I need to perform is to save the data i na file but only when the user wants to do so. 
    Any advice would be appriciated. 
    Solved!
    Go to Solution.

    You have two options:
    A.  As you mentioned, you can place code inside your current while loop to do the processing.  If you are clever, you won't need to place another while loop inside your existing one (nested loops).  But that totally depends on the type of processing you are doing.
    B.  Create a second parallel loop to do the processing.  This would decouple the processes to ensure that the processing does not hinder your acquisition.  See here for more info.
    Your choice really depends on the processing that you plan to perform.  If it is processor-intensive, it might introduce delays as you mentioned.  
    I would reccomend you first try to place everything in the first loop, and see if your DAQ buffer overflows (you can monitor the buffer backlog while its running).  If so, then you should decouple the processes into separate loops.
    Regarding whether or not "this would be considered to be real time processing" is a loaded question.  Most people on these forums will say that your system will NEVER be real-time because you are using a desktop PC to perform the processing (note:  I am assuming this is code running on a laptop or desktop?).  It is not a deterministic system and your data is already "old" by the time it exits your DAQ buffer.  But the answer to your question really depends on how you define "real-time processing".  Many lay-people will define it as the processing of "live data" ... but what is "live data"?

  • Final cut and hardwear acceleration (real time Rendering )

    hi all
    used final cut pro in vedio editting i search for any solution for accelerat my rendering time ...am tierd coz its take alot time ....i search about hardwear pci card like aja and matrox but i dont sure it work..............
    i search also about tuning of the mac os itself but i dont find any things.........
    plz help me if any one know ...............

    There are no third party hardware solutions to speeding up render times. Not Matrox, or AJA. A better graphics card will make certain effects real time or render faster (the FXPlug ones only). But really, the only thing that speeds up render times are processors. So the only way to speed up render times would be to get a faster machine.
    Shane

  • Can I acquire and analyse in real time with regular Labview?

    I have to acquire samples (which vary cyclically in a roughly sinusoidal fashion) from a sensor, and check every sample to see if it is the minimum (the valley) of a cycle. If it is, and it does not fall within an expected range, I have to take a corrective action that involves rejecting the part that was just measured as well as a 30 more parts (to make sure that the defective part has been rejected). The signal from the sensor is not very noisy, but beause of the nature of the measured object, there could be local minima and maxima. To guard against that, a point is considered to be a valley only if subsequent readings deviate above that point by a certain amount. If a part is indeed defective,
    a digital out put has to issued to reject that part.
    Can all these be done using regular Labview (not RT)? I tried it out with a proto-type VI, using DAQmx vis, continously acquiring samples, but reading one sample at a time from within a loop (the VI I used is attached with this question). The result has been disappointing, since each time the loop executes there is a delay that keeps building up. Finally, even after the part feed has been turned off I can see Labview processing signals from parts that have long since gone past the measuring head.
    Another perplexing thing I found is that the time taken to execute the while loop in the vi is not consistent; it takes anything from 6 to 50ms to execute.
    I will need atleast 8-12 samples from a part to build its profile, and the feed rate is about 3000 parts per minute. I am using Labview 7.0 with an NI-6013 card in a Windows 2000 environment.
    Thanks for any suggestions / recommendations.
    Attachments:
    find_trough_2.vi ‏378 KB

    Hello,
    Thank you for your suggestions; I had already resigned myself to going for a Real Time system, your answer convinced me to commit myself to it!
    That said, your reply leads to a couple of (related) questions...
    1. Your point regarding the use of Local Variables is well taken; I have been repeatedly told at various training sessions how the necessity of updating the LVs during each loop iteration slows the computation time. However, what alternative do we have when there are several controls to which we have to write AND read data multiple times during a loop iteration, and perform different computations based on the value held by these controls? (You have seen the VI I attached with the original question). Some of these conditional
    computations further change the value of the controls. Does Labview have any other mechanism to store and manipulate the intermediate value from a computation?
    2. I did a simple experiment to determine the average loop time, and the results were surprising. I placed the entire content of the VI I used (Find the Valley in cycle.vi) in a stacked sequence structure, and wired the index counter "i" to a control to count the number of iterations the loop executes. I placed a frame before this with a tick count instruction to get the start time of the loop, and a frame after this to get the end time of the loop. Dividng the difference of these with the number of iterations, I got the average loop time to be around 1.2ms! Am I interpreting my results incorrectly?
    Thnaks once again for your response. I would really appreciate your views on the questions I have raised in this comment
    Regards
    Arun P. Madangarli

  • Batch Convert 1080/24p to 720/24p... AND Conform to Real-Time

    Hi there! A little bit of a conundrum, but I'm sure the answer is out there.
    I have about 4 hours of content that was shot on the Sony FS700. The clips were shot at varying frame rates, but the FS700 automatically conforms high-speed footage at 1080/24p. We've already imported to ProRes 422, but I also have the source media (as shot) still available.
    I need to covert everything to 720p/24, and also conform to real-time. There's obviously a VERY long story as to why I'd need to "throw out" frames, but that's beside the point. We've all dealt with silly clients...
    Rest assured, our group will edit with the original media (and just speed up when we need real-time.) Any suggestions? I'm on a Mac with Adobe CS6 (new convert!) and Final Cut Studio 3. I also own Telestream Episode. THANKS!

    Thanks very much for your help. Yes, it was the faster frame rate I was thinking that I thought could help for the fast action sequences. I was concerned about the jello problem that might be more noticeable at a lower frame rate in fast action scenes. If I'm not mistaken, I believe the GH1 doesn't shoot interlaced, only 1080p and 720p in its movie modes.
    Actually, sorry I made a mistake in my previous post. In 720, the Gh1 shoots at 60fps, not 30.
    My plan was for the timeline sequence to be 1080 and just drop the 720/60p scenes into the 1080/24p timeline. On the GH1, the advantage of shooting in the 720/60p mode is the great slow motion shots you get when slowed down to 24p. Otherwise, yes, the majority would be 24p.

  • Premiere timeline plays fine, but output extremely slow and screen lags

    In Adobe Premiere CS6 I've been working on this timeline.  I've added some effects to a couple clips such as drop shadow and basic 3D.  The timeline plays perfectly fine.  However, when I go to output this sequence to H.264 or MPEG 2 for DVD the first clip with these effects takes forever to output.  Also, if I force render the segment to make a preview, it also takes forever.  It is using the GPU to render, as the CPU has very little going on, but things on my computer screen take forever to do anything. If I open a window while it is rendering, it is extremely sluggish.  I don't remember CS5 ever doing this. 
    Why would it be able to play the clip just fine, but take 10+ minutes to render the 10 seconds?  Granted, I understand it is doing scaling bicubically now instead of bilinearly, but wow, this is sort of wierd.
    I've also tried turning on and off certain effects to see if one is more problematic than another.  The effects that appear to be intensive are the "Drop Shadow" and the "Basic 3D" effects.  That's what is killing this.
    Can anyone tell me how big of a performance jump would I get going from a GTX 470 to a GTX 680? 
    Thanks

    Please provide more information about your computer, and your project http://forums.adobe.com/message/4200840

  • Show RMAN  message in log file and screen at same time

    Is there any way I can save all RMAN message in a log file and also show on standar out (screen).
    Thanks

    Hi,
    You can try a shell script like this if you are using linux:
    #!/bin/sh
    # Name: test_backup
    # Author: Tad_cs
    # Description: Executes backup using the RMAN
    export ORACLE_HOME=$1
    export ORACLE_SID=$2
    export LOG_DIR=$3
    # Variables:
    SCRIPT="test_backup"
    data_log=`date '+%y-%m-%d_%H:%M:%S'`
    logfile=${LOG_DIR}/${SCRIPT}-${data_log}.log
    # Execution of script backup of rman:
    $ORACLE_HOME/bin/rman <<EOF > $logfile
    connect target rman/rman
    connect catalog rman/rman
    run { execute script test_backup; }
    EOF
    exitSo, While the script is performing, you can open other screen, search for
    the log that is generating, and see the contents using:
    tail -f log_file_name.logIs this you need?
    []´s

  • Read from text file and plot in real time

    Hello to everybody,
    I recently started using labview and so I know very few features, I apologize for any crap I'm about to write.
    My problem is as follows:
    _ A wireless node is sampling, with a known frequency, the voltage and the current of an electronic device
    _ These data are sent to a coordinator connected to the PC
    _ Each packet sent includes a single column with: Letter V followed by voltage samples, Letter I followed by current samples (all in a single column as in the attached example)
    _ The coordinator saves it in a .txt file
    I want to do a labview application that:
    _ Reads that file (continuosly update by the coordinator)
    _ Plots on two different graphs the values (over the time) of current and voltage
    Thanks for your help
    Danilo
    Attachments:
    TextData.txt ‏1 KB

    There are File IO examples that ship with LV which show you how to write to red from a file . A more fundamental question though is why have the file at all? Is it serving strictly as a data communication channel, or will it be used for something else?
    The "coordinator" that you mention, can it be accessed directly? Serial IO? TCP/IP? Telnet? ActiveX? .NET? Anything?
    If so, that would be the preferred way to handle this situation.
    Mike...
    PS: Sorry for the next bit, but I used to be a magazine editor and my grandmother was a school teacher so I am just a tiny bit anal retentive about word usage: In English "data" is a funny word in that while it is a singular form, it is (depending upon context) often understood to referring to multiple things and so can be sort of plural. Consequently, it is proper to say: "This data is sent.. " or "The data indicates...", but not, "The data are showing..". Likewise it is always incorrect to try to make it plural by saying "datas".
    PPS: The same goes for the word "code" when used as a noun. It can also be a verb, but that's a whole different rant...
    PPPS: Also be aware that many of the people who know me well would object to the "tiny bit" part...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Head office and POS integration real time scenerio

    Hello experts,
    I am looking for some realtime scenerio of head office integration with pos (3rd party). Kindly give me some guidelines on the same.
    With Regards
    Abhishek Sinha
    Idhasoft, India

    Hello,
    SAP has got standard solution called POSDM for POS Integration with backend ERP system. Please see the attached link for details [http://sapknowhow.ning.com/profiles/blog/show?id=2328205%3ABlogPost%3A381].
    Thanks,
    Venu

Maybe you are looking for

  • Error while posting MIRO document

    Dear All When i try to post the invoice through MIRO transactions, i get short dump. I am posting this invoice with 3 decimals for example 1.235 Overflow during the arithmetical operation (type P) in program "SAPLFDMM". An exception occurred that is

  • Problem uploading by FTP

    I have two sites, both of which are created in iWeb and uploaded by FTP to sites hosted by Yahoo Small Business. My wife's site uploads without difficulty, but everytime I try to upload mine I get a message about problem communicating with the server

  • Array processing question

    Hello, I am somewhat new to JNI technology and am getting a bit confused about array processing. I am developing a C program that is called by a third party application. The third party application expects the C function to have a prototype similar t

  • Workflow in Waiting status..

    Hi Friends,      I am executing a workflow from an reprot using function module. but when i have checked the log then i found that the header workitem (workflow) is in waiting state. what can be the reasons behind it... Thanks Dev

  • FRM-40735 ORA-1476

    I write code in when-validate-item :bottomcost.ctoa := nvl(:grand1,0)/nvl(:exc_rate1,0); :bottomcost.ctob := nvl(:grand2,0)/nvl(:exc_rate1,0); :bottomcost.ctoc := nvl(:grand3,0)/nvl(:exc_rate1,0); when I leave empty exc_rate1 item in form it shows th