Using the GNU parallel_php Tutorial

Source: Internet
Author: User

Using the GNU Parallel


To create a cron task in bulk:
    1. # Host.lst is the host list


      # View current cron tasks
      Parallel--nonall-j0--slf host.lst "Hostname;crontab-l"


      # View/var/spool/cron File
      Parallel--nonall-j0--slf host.lst "Hostname;ls-l/var/spool/cron"


      # Set Cron Task
      Parallel--nonall-j0--SLF host.lst Echo ' "0 0 * * * cd/root/nmon;/root/nmon/nmon-f-s600-c144" >/var/spool/cron/r Oot

The--tag parameter adds a marker to the output line
    1. # when there is an input parameter, the tag content is the input parameter,
    2. # when there is no input parameter (--nonall), the tag content is sshlogin.
    3. Parallel--tag--nonall-j0--SLF host.lst uptime

SCP Collection Files
    1. Parallel-a host.lst scp ' "{}:/root/nmon/*160401*.nmon" '.



  • # Host.lst is the host list


    # View current cron tasks
    Parallel--nonall-j0--slf host.lst "Hostname;crontab-l"


    # View/var/spool/cron File
    Parallel--nonall-j0--slf host.lst "Hostname;ls-l/var/spool/cron"


    # Set Cron Task
    Parallel--nonall-j0--SLF host.lst Echo ' "0 0 * * * cd/root/nmon;/root/nmon/nmon-f-s600-c144" >/var/spool/cron/r Oot

  • #--tag can add tags to the output line.
    # when there is an input parameter, the tag content is the input parameter,
    # when there is no input parameter (--nonall), the tag content is sshlogin.
    Parallel--tag--NONALL-J0--SLF host.lst uptime
  • http://www.bkjia.com/PHPjc/1117249.html www.bkjia.com true http://www.bkjia.com/PHPjc/1117249.html techarticle use GNU parallel to create a cron task in bulk: # HOST.LST is the host List # view current cron task parallel--nonall-j0--slf host.lst "Hostname;crontab-l" # View/var/spool/cron ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.