Using perf stat on command with ssh piping?

Does anyone familiar with perf tools in kernel?
https://perf.wiki.kernel.org/index.php/Tutorial
I want to use perf stat to get hardware events data from a command that sends data from home to a remote device.
For example:
cat file > ssh user@ipaddress "cat > newlocation/file"
perf stat cat file > ssh user@ipaddress "cat > newlocation/file"
Do you know how can I ensure that perf tools will record hardware event data during delays (over networks)... What I am worried is that perf will only measure upto pipe symbol and ignore anything else (I had this esperiance with /usr/bin/time (after which I switched to use shell time).
I could not find any information on how perf stat is working when there is a pipe in the middle of that command it will measure.
Would it be better to put command below into a sh file and then call perf stat command.sh?
cat file > ssh user@ipaddress "cat > newlocation/file"
Last edited by kdar (2012-06-26 03:22:05)

The other command that I trying to use is actually using compression over network..
like gzip -fc file | ssh user@host "cat > /dev/null"
I guess its a better example that what I posted on the first post.... using cat
@falconindy
I could convert  gzip -fc file | ssh user@host "cat > /dev/null" similar to your example without using a pipe too?
ssh user@host 'cat > /dev/null' < gzip -fc file  ? or it would not work?
====
Would putting a command into cmd.sh file create overhead? (of reading a file.. etc)
Last edited by kdar (2012-06-26 15:20:59)

Similar Messages

  • How to use "OCI Statement Cache - OCIStmtPrepare2" with XA ? Tuxedo ?

    Hi All
    Is there is a way to use "OCI Statement Cache - OCIStmtPrepare2" with tuxedo and XA ?
    We have found out that a lot of the "CPU time" is spent by OCIStmtPrepare. We have 8 frequent statements (with bind) that we would like to cache .
    Based on the following ORACLE paper, our interpenetration is that it is not allowed to cache statements when using XA.
    *"Oracle® Database Advanced Application Developer's Guide 11g Release 1 (11.1)" - "Developing Applications with Oracle XA"*
    Highlights from the ORACLE paper.
    "When used in an Oracle XA application, cursors are valid only for the duration of the transaction. Explicit cursors must be opened after the transaction begins, and closed before the commit or rollback."
    "Ensure that the application resets the fetch state before ending a transaction. In general, use release_cursor=no. Use release_cursor=yes only when you are certain that a statement will execute only once."
    Regards
    TechSgin

    confirmed by ORACLE.
    XA connections don't support OCIStmtPrepare2 (statement caching)

  • Disk repair using the format - repair command with a mounted partition

    I was going to repair some bad blocks on a disk by using the format command with the repair option. When I entered the block number to be fixed it came back withthe question of:
    "Repair is in a mounted partition, continue?"
    Will I hurt anything on my system if I answer yes to continue or should the partition be unmounted before I do this?
    Thanks

    Did you have any answer?

  • Used Mavericks DNS Flush Commands with 10.8.5

    Mid 2011 Mac Book Air OS 10.8.5. In Terminal, I mistakenly used Maverick's DNS Flush commands dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
    I note that 10.8.5 only requires the second command.
    Any problems with this blunder? Tks.

    Lex,
    Hmm, flushing DNS cache. With Safari on all of my Mac devices, I started having difficulty, initially on my iPad, accessing Zite and an internet radio, Tunein Radio Pro. After googling the error message "....cannot find the server", I put in the two 208....DNS numbers. I will now add the others you suggest. at some stage I read an article about flushing DNS caches, it suggesting using the Apple Store app. It seemed a good idea... The app is https://itunes.apple.com/us/app/clean-dns-cache-english/id628459184?mt=12. As a precaution I have loaded it only on my Mac Book Air, which is due for a clean install of Mavericks 10.9.2 when it is finalised. The app had a good review, and it would have been nice to have used it instead of using terminal, but I take your point that DNS caches are best left alone. Particularly for tyros! I will delete the app in due course. Thank you for the time and thought you have put in.
    Cheers
    Ken
    Lower Hutt NZ
    On 21/02/2014, at 1:28, Apple Support Communities Updates <[email protected]> wrote:
    208.67.222.222

  • My blind Mom can't find her Audiobooks when using the simplest of commands with SIRI?

    I am experiencing problems with SIRI playing an audiobook for my blind Mom. What are the best routes to use this feature? Put all audiobooks in Music or can SIRI find audiobooks anywhere on my IPAD with the right voice commands and formatting. This is an experimental quest I am on the enable her to enjoy books without having to press a lot of buttons! For example, I have an audiobook of Jack London's White Fang but whenever I ask SIRI to play it, it comes back with White Thing!! pronounced Thang ?? Do I need to load a different dictionary of English and I enunciate the word FANG very clearly in English. HELP and Mom thanks you in advance.
    JW

    - kind of like using search engines....get the right words, get a hit!
    Cheers,
    GB

  • Runtime exec command parameters with SSH

    hey,
    Im trying to run a unix command using Process proc = Runtime.getRuntime().exec(command);
    It works fine until I tried to combine it with multiple commands.
    For example, I'm trying to run:
    ssh [email protected] 'ls -al'
    This returns a exit value of -1, command not found.
    ssh [email protected] ls works fine so I suspect its related to the extra parameters.
    I checked the Javadoc page for exec:
    The command argument is parsed into tokens and then executed as a command in a separate process. The token parsing is done by a StringTokenizer created by the call:
    new StringTokenizer(command)
    As expected, it tokenized:
    ssh
    [email protected]
    'ls
    -al'
    Is there any way to bypass this default tokenization by exec to include quotes as one token?
    If anyone has any ideas, let me know! Thanks!

    thanks, solves that part.. but if i use execute command with ssh and bsub(a clustering job queue-submitter), it does ot return the correct value.
    For example, if i do ssh [email protected] bsub -I ls using exec and the waitFor() method, the waitFor waits indefinitely.
    I can tell it ran the job and ended, because i checked via bjobs and it finished. So why isn't the java app getting the exit code from waitFor() back?
    If I run the program on the targeted machine, bsub -I ls, it works correctly.
    If i type in the console, ssh [email protected] bsub -I ls, it returns back the results correctly.
    info regarding bsub and bjobs here http://www.ncsa.uiuc.edu/UserInfo/Resources/Hardware/XeonCluster/Doc/Jobs.html

  • OEM12C BP1 Default preferred credentials with SSH key credentials ?

    Is it possible to configure Host Default Preferred Credentials to use a named credential created with SSH Key credentials ?
    The drop down list only lists credentials configured with host credential types.

    host target type has 2 out of the box credential set HostCredsNormal and HostCredsPriv
    And both these are of type HostCreds (Username and password)
    And there's code which assumes these to be of type HostCreds and process password.
    Hence these are left as is.
    What customers can do is, create additional credential set (emcli create_credential_set) and use HostSSHCreds type for it.

  • Using a dynamic file path with the import command

    In one of the BI Publisher blog entries it was mentioned that the curly braces tell the parser that it needs to evaluate this value first before executing the import statement. The example provided was using the built-in parameter CURRENT_SERVER_URL, but it also mentioned that this could be done with any parameter.
    I am trying to import a subtemplate using a parameter that will hold the relative path. I am using the following import command in my report template:
    <?import:file:///{$P_SERVERPATH}/Report Path/Subtemplate.rtf?>
    as well as the following declaration statement:
    <?param@begin:P_SERVERPATH?>
    It appears that the P_SERVERPATH parameter is not being evaluated before the import statement. Am I missing anything?
    Any help is greatly appreciated, we are a little over a week from migrating to a new environment and I need to nail down a solution ASAP.
    Thanks,
    John

    I believe that you cannot have a dynamic path in the import statement as it is not allowed by xsl.

  • Remote ssh commands with wild cards

    I am trying to send a remote command via ssh - need to get a file listing in a directory using a wild card. However, the ssh command will not return results using a wild card:
    ssh [email protected] sudo ls -l /var/audit-files/201110* (directory requires root permission)
    /var/audit-files/201110*: No such file or directory
    I've tried quoting the command, the directory, the file names, etc - same results. It will only work with a specific name that exists, but not with a wild card. Is there a way to make this work?

    This is a rather complex situation. The problem is that you need to quote the '*' character; however, quoting it once may not be enough. Every time the command goes through a shell you'll strip out a set of quotes. It isn't clear to me how many times this will go through the shell but I'm guessing you'll have to at least double quote it.
    ssh [email protected] sudo ls -l "/var/audit-files/201110\*"
    I won't guarantee that this will work but it might. I don't know what the permissions are on /var/audit_files. If you need root to read that you may need to triple quote it. I've never had much luck getting the quotes right in complicated situations like this.

  • Can I use a solid state drive (SSD) with a G4 1 GHz powerbook? If so, how do I do it?

    Hi:
    Can I use a solid state drive (SSD) with a G4 1 GHz powerbook? If so, how do I do it? Thanks.
    fromx001

    fromx001 I believe you can use a SSD as internal drive, of course make sure to buy an ide/ata. There are all sorts of sizes up to 480 GB also in the ide/ata standard. You should however research carefully your purchase, as the performances of your SSD are going to have to rely on firmware "garbage collection", as the older operating systems haven't been written with SSD in mind.
    Mac Man JW: some people depend on Classic as a brody said, other people need a phone modem from time to time, other people use the laptop in harsh environments, and at -15C and below, LCD screens easily crack and break; NOT the powerbook which has hot air towards the screen (and it's a machine that heats quite a lot). My alu Powerbook 12", which was *not* treated with velvet gloves, only once had a cracked screen: a cleaning lady had stepped over it (!!!!) no joke. And in normal / light use today, it is still pretty decent and usable. 

  • What is use of INCLUDE in command line statement?

    Pls. explain following line. How this works and what is expected output for this line.
    /: INCLUDE &VBDKA-ZTERM& OBJECT TEXT ID SDTP PARAGRAPH L
    Thanks
    Harshada

    hi Harshada,
    INCLUDE: Include other texts
    With the command INCLUDE, you can include the contents of another text into your text. The text to be included exists separately from yours and is only copied at the time of the output formatting.With the INCLUDE command, you always get the most current version of the required text, since this is only read and inserted during the output formatting.
    Syntax:
    /: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p] [NEW-PARAGRAPH np]
    The name of the text to be inserted must be specified and can have up to a maximum of 70 characters. If the text name contains blanks, then you must put it in quotes as a literal. It can also be specified via a symbol. All further parameters of the INCLUDE command are optional. If they are missing, SAPscript uses default values for them which are based on the respective call environment.
    Examples:
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE ‘E’ PARAGRAPH ‘A1’
    The text with the name MYTEXT and the language E is included, regardless of in which language the calling text is created. The paragraph format A1 is valid as the standard paragraph for this call.
    Optional specifications:
    •&#61472;LANGUAGE If a language is not specified, the language of the calling text or the layout set is set for the text to be included. If a language is specified, the text is always loaded in this language, regardless of the language of the calling text.
    •&#61472;PARAGRAPH The text to be included is formatted with the style allocated to it. With this parameter, the standard paragraph of this style can be redefined for the current call. All * paragraphs of the inserted text are then formatted with the paragraph specified here.
    •&#61472;NEW-PARAGRAPH The first line of the included text has this format flag, provided it is not a command or comment line. If the optional entry PARAGRAPH (see above) is empty, all * paragraphs of the included text are formatted with the paragraph np specified with
    NEW-PARAGRAPH.
    •&#61472;OBJECT To specify a text completely, you must make further specifications regarding the text object. There are different rules and restrictions for this which depend on the object type of the calling text: All texts can be included in a layout set. If no object is entered here, TEXT is used (standard texts).With a documentation text (object DOKU), you can only include documentation texts. This object is assumed even if no object is specified in this environment. Only hypertext or documentation text can be included into a hypertext (object DSYS). If the OBJECT specification is missing, DSYS is set as a default value.
    Only standard text (object TEXT), documentation text or hypertext can be included in any other type of text. The default object is TEXT if nothing is entered.
    •&#61472;ID The text ID, which allows further text types within an object, is a further part of the text key. If the ID is not entered, the default Include ID from table TTXID is used for the calling text. If the specification is not in this table, the text ID of the calling text is used.
    The ID together with the object are now the basis of a further consistency check:
    •&#61472;All text IDs are allowed for a layout set.
    •&#61472;Only documentation texts with the text IDs TX (general texts), UO (authorization objects), and documentation texts which have the same text ID as the calling documentation text may be included in documentation texts.
    •&#61472;All DSYS texts may be included in DSYS texts, regardless of their ID. Documentation texts to be inserted may only have IDs TX and UO.
    •&#61472;Standard texts with all the allowed text IDs, DSYS texts with all IDs, and documentation texts with Ids TX and UO may be included in the other types of texts.
    Regards,
    Santosh
    Message was edited by:
            Santosh Kumar Patha

  • How to use union statement with declare & set function?

    Hi Experts,
            i  have small query about how to use union statement with declare & set function?
    Example as below :
    DECLARE @name AS date
    Declare @name2  AS date
    /* SELECT FROM [2013].[dbo].[OINV] T0 */
    /* WHERE */
    SET @name = /* T0.DocDate */ '[%1]'
    SET @name2 = /* T0.DocDate */ '[%2]'
    select  '2013',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
    datediff(dd,t3.DocDate,t1.Docdate) as Days
    from 2013.dbo.orct t1
    inner join 2013.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
    left join 2013.dbo.oinv t3 on
    t3.docentry = t2.baseAbs
    inner join 2013.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
    inner join [2013].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
    where t2.DcntSum <> 0.000000 and t3.DocDate between [%1] and [%2]
    Union
    /* SELECT FROM [2014].[dbo].[OINV] T0 */
    /* WHERE */
    SET @name = /* T0.DocDate */ '[%1]'
    SET @name2 = /* T0.DocDate */ '[%2]'
    select  '2014',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
    datediff(dd,t3.DocDate,t1.Docdate) as Days
    from 2014.dbo.orct t1
    inner join 2014.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
    left join 2014.dbo.oinv t3 on
    t3.docentry = t2.baseAbs
    inner join 2014.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
    inner join [2014].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
    where t2.DcntSum <> 0.000000 and t3.DocDate between [%1] and [%2]

    You have to create stored procedure in SQL only .
    Like u must have create for Crystal .
    You can execute procedure in query manager but you have to enter parameter manually..
    example
    Exec @Test '20140101' '20140501'
    Every time user has to enter it manually in yyyymmdd format in case of date parameters.
    Example
    Create Proc [@Test]
    as begin
    DECLARE @name AS date
    Declare @name2  AS date
    /* SELECT FROM [2013].[dbo].[OINV] T0 */
    /* WHERE */
    select  '2013',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
    datediff(dd,t3.DocDate,t1.Docdate) as Days
    from 2013.dbo.orct t1
    inner join 2013.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
    left join 2013.dbo.oinv t3 on
    t3.docentry = t2.baseAbs
    inner join 2013.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
    inner join [2013].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
    where t2.DcntSum <> 0.000000 and t3.DocDate between @Name and @Name2
    Union
    /* SELECT FROM [2014].[dbo].[OINV] T0 */
    /* WHERE */
    select  '2014',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
    datediff(dd,t3.DocDate,t1.Docdate) as Days
    from 2014.dbo.orct t1
    inner join 2014.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
    left join 2014.dbo.oinv t3 on
    t3.docentry = t2.baseAbs
    inner join 2014.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
    inner join [2014].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
    where t2.DcntSum <> 0.000000 and t3.DocDate between
    between @Name and @Name2
    end

  • Hey Guys I Travel to the States and I am from Germany. I want to buy an iPhone 4S 8GB white Version unlocked GSM. Can I use the iPhone in Germany with every SIM Card?

    Hey Guys I Travel to the States and I am from Germany. I want to buy an iPhone 4S 8GB white Version unlocked GSM. Can I use the iPhone in Germany with every SIM Card?

    As long as you buy from an Apple retail Store (Apple owned ) an unlocked iPhone 4S it will work on GSM services worldwide
    from Apple.com
    If you buy a SIM-free iPhone, you will need to purchase a GSM-compatible micro-SIM separately. When you travel internationally, you can use a micro-SIM card for iPhone 4s from a local GSM carrier.
    The unlocked iPhone will not work with CDMA carriers such as Verizon Wireless or Sprint.
    However the warranty will NOT be valid outside the US .If you need warranty or post warranty service you will have to return the iPhone to the US in person ( cannot mail in to US )

  • At CRS-1,how can i use show command with pipe | ?

    HI,ALL
    when I use show command with pipe on the CRS-1,the command invalid
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |errors 
                                                                       ^
    % Invalid input detected at '^' marker.
    ========================================================
    But Previously on the cisco 7609,I can use the show command
    GZ-DM-SR-1.MAN.7609#show int | include line |err
    Vlan1 is down, line protocol is down
         0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
         0 packets output, 0 bytes, 0 underruns
         0 output errors, 0 interface resets
    Vlan11 is administratively down, line protocol is down
         0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
         0 packets output, 0 bytes, 0 underruns
         0 output errors, 0 interface resets
    Vlan99 is down, line protocol is down
         0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
         0 packets output, 0 bytes, 0 underruns
         0 output errors, 0 interface resets

    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |errors 
                                                                       ^
    % Invalid input detected at '^' marker.
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |?    

    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line | |?
                                                                        ^
    % Invalid input detected at '^' marker.
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line | ?
      begin    Begin with the line that matches
      exclude  Exclude lines that match
      file     Save the configuration
      include  Include lines that match
      utility  A set of common unix utilities
      <cr>    
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |
    % Incomplete command.
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |errors
                                                                       ^
    % Invalid input detected at '^' marker.
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#                                     
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line | ?   
      begin    Begin with the line that matches
      exclude  Exclude lines that match
      file     Save the configuration
      include  Include lines that match
      utility  A set of common unix utilities
      <cr>    
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |?

    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line | include er$
    Thu Jan 15 22:36:24.120 GMT
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line           
    Thu Jan 15 22:37:05.013 GMT
    Loopback0 is up, line protocol is up
    Loopback1 is up, line protocol is up
    Loopback6 is up, line protocol is up
    Null0 is up, line protocol is up
    POS0/0/0/0 is up, line protocol is up  (APS not Configured )
    POS0/0/1/0 is up, line protocol is up  (APS not Configured )
    TenGigE0/0/4/0 is up, line protocol is up

  • Problems using 488.2 commands with Agilent 82357 interface

    Hi, I need to send a large file to an instrument in chunks using the 488.2 commands sendsetup and senddatabytes. When I try to use these commands I just get an error saying 'NI-488: Error connecting to driver or device'. The interface works fine using visa. I’ve tried the obvious in checking that the bus address is correct and I believe it to be.
    Anybody know what I may be doing wrong or if its possible to do it another way? I’m starting to wonder if its an issue with it being a non NI interface.
    Thanks

    Hi,
      We have done trade-ins in the past with 3rd party hardware, and this may be an easy solution for you since we do have a USB-GPIB interface available that does Standard and HS gpib (you didn't say if you were using the A or B variant of the Agilent 82357.
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/201586
    I'd suggest contacting your local sales office (+44 1635 572400 for the UK) to find out if this is acheivable in your case, or to arrange a loan to see if that in fact fixes the issue and makes the option more practical.
    Thanks
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer

Maybe you are looking for

  • My Acrobat tab is missing in Office 2013

    I have office 2013 (Windows 7) and Acrobat XI (Creative Cloud). I have always had an Acrobat tab and have used it successfully many times to create PDFs. Recently it has gone missing. I no longer have the tab, and I can no longer create PDFs. I can s

  • Java Web Start and Cookies

    Hello All, We have the following scenario 1) A user logs in to our website. The session information for the logged in user is maintained in the cookie. 2) The User clicks the jnlp link to invoke the applet. 3) The Java Web Start gets activiated and i

  • Synchronizing  the Adobe Air application  with the remote server daily

    I am building a desktop application which is built in Adobe Air using FlexBuilder3. I want my application to connect to remote server daily at a particular time on a day and check for updates and download them, irrespective of whether the application

  • Auth check to who can change the defaulted approver

    Hi Folks, I have a scenario where I do not want the SC creater to be able to change the defaulted approver. I this done by a special auth. object. or anything like that? Thanks in advance, Thomas Midtboell

  • Indesign cs3 and windows 8.1

    I'm having trouble installing indesign cs3 with Windows 8.1.  The program says I need to upgrade screen resolution.  My lowest screen resolution is the minimum required.  I have the highest.  Any options or ideas for getting past this?