RealTechTalk (RTT) - Linux/Server Administration/Related

We have years of knowledge with technology, especially in the IT (Information Technology) industry. 

realtechtalk.com will always have fresh and useful information on a variety of subjects from Graphic Design, Server Administration, Web  Hosting Industry and much more.

This site will specialize in unique topics and problems faced by web hosts, Unix/Linux administrators, web developers, computer technicians, hardware, networking, scripting, web design and much more. The aim of this site is to explain common problems and solutions in a simple way. Forums are ineffective because they have a lot of talk, but it's hard to find the answer you're looking for, and as we know, the answer is usually not there. No one has time to scour the net for forums and read pages of irrelevant information on different forums/threads. RTT just gives you what you're looking for.

  • Prevent SSH Bruteforce and Hacks By Disabling Password Authentication


    One simple way to keep your server public but almost impossible to hack via SSH is to disable password authentication over SSH.  This means the only way in is via  your own private key that only you should have.

    Edit your /etc/ssh/sshd.conf file

    Set this option

    PasswordAuthentication no

    Restart your SSH server.

    service sshd restart

     

    Now your server will be much more secure, even if someone has the password they cannot login remotely no matter what (so long as no one has stolen your private key).  This makes bruteforcing absolutely impossible, so long as they don't enter another way, get root access and enable password login again.


  • SMF Forums / Simple Machines Forums Not Displaying Images Theme or Styles Properly using 127.0.0.1


    This is one thing that has me wondering about SMF.  It is apparently a known issue but in the latest version and new install nothing looked right because it was using http://127.0.0.1 to find everything!  How on earth would it ever do this or think it is normal?

    Excerpt of crazy html code it produces that causes the issue:


        <link rel="stylesheet" type="text/css" href="http://127.0.0.1/smf/Themes/default/css/index.css?fin20" />
        <script type="text/javascript" src="http://127.0.0.1/smf/Themes/default/scripts/script.js?fin20"></script>
        <script type="text/javascript" src="http://127.0.0.1/smf/Themes/default/scripts/theme.js?fin20"></script>

            <img id="upshrink" src="http://127.0.0.1/smf/Themes/default/images/upshrink.png" alt="*" title="Shrink or expand the header." style="display: none;" />
                <img id="smflogo" src="http://127.0.0.1/smf/Themes/default/images/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />
            </div>



    To repair it you need to get a tool from the SMF site: https://wiki.simplemachines.org/smf/Repair_settings.php#Download_the_Repair_Settings_Tool

     

    Get the tool run it and you'll see some output like this:

    Almost always aside from MySQL DB you should change 127.0.0.1 to the domain name of your server.



     URLs
    These are the paths and URLs to your SMF installation, and can cause big problems when they are wrong. Sorry, there are a lot of them.
    Forum URL:    
    Recommended value: "https://forums.domain.com".
    Forum Directory:    
    Recommended value: "/var/www/vhosts/domain.com/httpdocs".
    Sources Directory:    
    Recommended value: "/var/www/vhosts/domain.com/httpdocs/Sources".
    Attachment Directory:    
    Recommended value: "/var/www/vhosts/domain.com/httpdocs/attachments".
    Avatar URL:    
    Recommended value: "https://forums.domain.com/avatars".
    Avatar Directory:    
    Recommended value: "/var/www/vhosts/domain.com/httpdocs/avatars".
    Custom Avatar URL:
    Value not found!    
    Custom Avatar Directory:
    Value not found!    
    Smileys URL:    
    Recommended value: "https://forums.domain.com/Smileys".
    Smileys Directory:    
    Recommended value: "/var/www/vhosts/domain.com/httpdocs/Smileys".






    Paths & URLs For Themes
    These are the paths and URLs to your SMF themes.
    SMF Default Theme - Curve URL:    
    Recommended value: "https://forums.domain.com/Themes/default".
    SMF Default Theme - Curve Images URL:    
    Recommended value: "https://forums.domain.com/Themes/default/images".
    SMF Default Theme - Curve Directory:    
    Recommended value: "/var/www/vhosts/domain.com/httpdocs/Themes/default".
    Core Theme URL:    
    Recommended value: "https://forums.domain.com/Themes/core".
    Core Theme Images URL:    
    Recommended value: "https://forums.domain.com/Themes/core/images".
    Core Theme Directory:    
    Recommended value: "/var/www/vhosts/domain.com/httpdocs/Themes/core".


  • solution mysqldump: Got error: 1044: Access denied for user 'user'@'localhost' to database 'thedb' when using LOCK TABLES


    It is simple the user just needs to be given the "LOCK TABLES" privilege.

    As root run this command:

    GRANT LOCK TABLES ON yourdatabase.* TO yourmysqluser@localhost;


  • MySQL How To Grant Access To ALL Databases For Export and Backup Purposes


    GRANT SELECT, LOCK TABLES ON *.* TO yourmysqluser@localhost;

    All you need to do a full MySQL dump on all databases is the SELECT and LOCK TABLES privileges.  This way you don't have to use the mysql root user.  Data could be compromised this way but at least no harm from manipulation, changes or deletion are possible by locking down the privileges to the minimum for a full MySQL dump and backup.

    Here is a command you could use to dump all databases.


  • mdadm how to stop or start a check


    It's fairly simple to start or stop a check but I do wish mdadm's command had this built in.  Sometimes it will do a check at the worst time causing the server to crawl to a halt.

    Stop check on md126:

    echo idle > /sys/block/md126/md/sync_action

    Start check on md126:

    echo check > /sys/block/md126/md/sync_action

     

    If you don't want to stop everything you can use this guide to set the minimum and maximum sync speed which does help.

     

     


  • vzquota : (error) Quota on syscall for id 4532: No such file or directory vzquota on failed [3] OpenVZ Error and Solution


    Starting container...
    vzquota : (error) Quota on syscall for id 4532: No such file or directory
    vzquota on failed [3]

     

    Solution

    vzquota drop 4532

    Then start the container and it should work.  It actually happened after migrating the VPS manually to another location (very common).

    Another way of doing essentially the same is the following:

    https://realtechtalk.com/vzquota_error_Quota_on_syscall_for_id_42131_No_such_file_or_directory_vzquota_on_failed_[3]-1447-articles


  • Apache htaccess Custom ErrorDocument not working properly for root home page 403 Error Issue and Solution


    So I have a domain "testdomain.com".

    Inside test domain.com's root is the following .htaccess:


    Options +FollowSymLinks -Indexes
    ErrorDocument 403 /launch/index.html

    Order Deny,Allow
    Deny From All
    Allow From 192.168.1.2

    When you visit anything other than root things work fine.  Eg. if you visit http://testdomain.com/somedirfile.html

    It will show the right error in /launch/

    But if you just visit the root you get the standard Apache Test page even though a 403 is returned.  The reason for this is because of an Alias "Error" in /etc/httpd/httpd.conf

    Find this line and comment it out:

    Alias /error/ "/var/www/error/"

    What happens when visiting root is that it checks for a custom 403 error in /var/www/error/ and when it doesn't find one in there it returns noindex.html (the Apache test page).

    However I don't know a better work-around what Apache then does after commenting out that alias is it insists in then looking inside your /www/document_root/error/ folder for a matching custom file.  If not it looks for a noindex.html in there.

    So all I did was create a no index.html in an error folder within my document root.

    This solves the issue but I am not sure of how to make a better solution.  I searched for hours modifying the vhost configuration but nothing worked or helped except the above.

    These URLs below had the same issue:


    https://www.linuxquestions.org/questions/linux-server-73/apache-403-on-root-serves-test-page-instead-of-forbidden-page-4175492016/
    https://www.linuxquestions.org/questions/linux-server-73/apache-denied-ips-getting-test-page-914257/

     


    Here is some of the troubleshooting process I went through:

     

    I have an issue where I am only allowing a few IPs to view a website in .htaccess:


    Options +FollowSymLinks -Indexes
    ErrorDocument 403 /launch/index.html

    Order Deny,Allow
    Deny From All
    Allow From 192.168.1.2


    # Now it works if you go to http://url/somecrap it will take you to /launch/index.html
    But if you just go to the reoot http://url/ or http://url you get the Apache Test page instead:



    https://www.linuxquestions.org/questions/linux-server-73/apache-403-on-root-serves-test-page-instead-of-forbidden-page-4175492016/
    https://www.linuxquestions.org/questions/linux-server-73/apache-denied-ips-getting-test-page-914257/

    solution:
    edit /etc/httpd/httpd.conf

    # Customizable error responses come in three flavors:
    # 1) plain text 2) local redirects 3) external redirects
    #
    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 /missing.html
    #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    #

    #
    # Putting this all together, we can internationalize error responses.
    #
    # We use Alias to redirect any /error/HTTP_<error>.html.var response to
    # our collection of by-error message multi-language collections.  We use
    # includes to substitute the appropriate text.
    #
    # You can modify the messages' appearance without changing any of the
    # default HTTP_<error>.html.var files by adding the line:
    #
    #   Alias /error/include/ "/your/include/path/"
    #
    # which allows you to create your own set of files by starting with the
    # /var/www/error/include/ files and
    # copying them to /your/include/path/, even on a per-VirtualHost basis.
    #

    #Alias /error/ "/var/www/error/"


    [root@serverdev error]# mv noindex.html noindex.html-bad
    [root@serverdev error]# readlink -f .
    /var/www/error


    Alias /error/ "/var/www/error/"


    #Alias /error/ "/var/www/error/"

    <IfModule mod_negotiation.c>
    <IfModule mod_include.c>
        <Directory "/var/www/error">
            AllowOverride None
            Options IncludesNoExec
            AddOutputFilter Includes html
            AddHandler type-map var
            Order allow,deny
            Allow from all
            LanguagePriority en es de fr
            ForceLanguagePriority Prefer Fallback
        </Directory>


    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    log#
    [Sun Apr 08 04:09:43 2018] [error] [client 192.168.1.55] client denied by server configuration: /www/vhosts/vhosttest.com/httpdocs/
    [Sun Apr 08 04:09:43 2018] [error] [client 192.168.1.55] client denied by server configuration: /www/vhosts/vhosttest.com/httpdocs/error
     


  • syslinux / pxelinux how to boot from local drive how to


    Just type the command:

    localboot

    By default it will boot the first local drive "0".  I believe you can specify a different number to boot a different device.

    eg.

    localboot 3

    (will boot the 4th BIOS device)'


  • samba how to listen on specific IP only


    This is useful for security purposes especially on a server which may have a public IP assigned to it but has a second NIC for the LAN.

    Here is how you edit smb.conf:

    [global]

    interfaces = 192.168.1.50
    bind interfaces only = yes

    As you can see above it will only listen on 192.168.1.50 and remind to keep the "bind interfaces only" option.


  • How To Install Windows Server 7 8 10 12 2008 2012 2014 2016 Servers Desktops using Linux tftp, dhcpd and samba


    It has been a big pain for a long-time to install Windows from a Linux environment.  I used to run a windows install server and it never worked right for some reason (the install would fail on most servers).

    Before getting start be sure to setup your samba share so once you boot into WinPE you can mount the install for whatever Windows you want

    /etc/samba/smb.conf

    [smbwinstall]
    path = /tftpboot/images/winstall
    guest ok = yes
    directory mask = 0775

    It's much easier and stable to deploy all OS's using a Linux tftp and dhcpd server:

     

    WinPE Boot with pxelinux
    It requires pxelinux 6.04 or higher so I've included that in winpe-libs.tar.gz

    cd /tftpboot/images
    wget realtechtalk.com/downloads/winpe-tftp.tar.gz
    wget realtechtalk.com/downloads/winpe-tftp-root-libs.tar.gz
    #Extract it into your /tftpboot/

    cd /tftpboot/
    tar -zxvf winpe-tftp-root-libs.tar.gz
    ldlinux.c32
    libcom32.c32
    libutil.c32
    linux.c32
    menu.c32
    pxelinux.0
    wimboot


    cp winpe-libs/* /tftpboot/

    tar -zxvf winpe-tftp.tar.gz
    Edit your /tftpboot/pxelinux.cfg/default

    Add this:

    MENU TITLE WinPE
    label WinPE
    com32 linux.c32
    APPEND wimboot initrdfile=../images/winpe/bootmgr,../images/winpe/bcd,../images/winpe/boot.sdi,../images/winpe/boot.wim

    #the next step is to make sure you have a samba or windows fileshare with the windows install you want

    mkdir -p /tftpboot/images/winstall
    #mount and copy the install you want

    pxeboot the WinPE image then mount the remote share and install windows from it

    Get booting!

    If everything was done right you should be able to boot off your NIC, see the pxellinux menu for winpe and boot into it.

    Once in WinPE type the following command to mount your install share:

    net use z: \192.168.5.20winstall

    z:

     

    Of course change the IP and "winstall" share name to match what you have on your network.
     


    #errors
    linux.c32: not a COM32R image this means your pxelinux is probably trying to open an image like Winpe with wimboot and is too old (upgrade to at least pxelinux 6.04.  The pxelinux.0 file in the winpe-tftp.tar.gz file is from 6.04 so it will automatically update if you overwrite your pxelinux.0 file
     


  • error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file Bitcoin Litecoin Error


    error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file

    This is usually because the .cookie file cannot be read by the user you are running Litecoin or Bitcoin client/daemon as.

    You can adjust the permissions of the file so that the user or group they are apart of has read permissions.

     


  • OpenVZ Solutions vzquota : (error) Can't open quota file for id 123123, maybe you need to reinitialize quota: No such file or directory


    Error: Unable to apply new quota values: quota not running
    Container start failed (try to check kernel messages, e.g. "dmesg | tail")
    Killing container ...
    Container was stopped
    Error: Unable to apply new quota values: quota not running
    Can't umount /vz/private/123123: Invalid argument


    [root@rtt 123123]# vzquota on 123123
    vzquota : (error) Can't open quota file for id 123123, maybe you need to reinitialize quota: No such file or directory
    You have mail in /var/spool/mail/root
    [root@rtt 123123]# vzquota off 123123
    vzquota : (error) Can't open quota file for id 123123, maybe you need to reinitialize quota: No such file or directory


    problem:

    VE_ROOT="/vz/private/$VEID"
    VE_PRIVATE="/vz/private/$VEID"


    solution = fix VE_ROOT!

    VE_ROOT="/vz/root/$VEID"



     vzctl start 123123
    Starting container...
    Initializing quota ...
    Container is mounted
    Adding IP address(es):
    Setting CPU units: 1000
    Container start in progress...


     


  • curl: (35) Unknown SSL protocol error in connection Solution Centos


    curl: (35) Unknown SSL protocol error in connection

    The main solution is to update curl and nss.  If you are having an issue with curl through Apache/PHP you will need to restart PHP after.

    It's important to remember that this error could mean a lot of things but most often it simply means that curl and openssl may be outdated and only allow newer secure ways of connecting to SSL.

    In general here is how you would fix it in most cases:

    yum -y update curl nss openssl

    *Remember again if your PHP/Apache application is using curl it won't work until you restart Apache


  • sudo: unable to resolve host


    sudo: unable to resolve host yourhostname

    No clue why sudo is doing that when running.

    Solution

     

    Check /etc/hosts

    You will probably find that it doesn't contain "yourhostname" for 127.0.0.1

    Just update the hostname or add a field for your hostname like this:

    127.0.0.1 yourhostname

     


  • "Object of class WP_Term could not be converted to string"


    Normally when I've seen this it's when you are using a variable like a normal string when in fact it's actually an array such as this example:

     

    [Tue Mar 13 04:22:35 2018] [error] PHP Catchable fatal error:  Object of class WP_Term could not be converted to string in /vhost/httpdocs/wp-content/plugins/wp-instagram-post/classes/class-woo-igp.php on line 578


                                    $tags = get_tags($post_id);
                                    foreach ( $tags as $tag )
                                    {
                                       $the_tags=$the_tags. "#". $tag;
                                    }

     

    With the above the $tag variable actually is an array so you would need to reference it like this $tag->name or $tag["name"];

     


  • Wordpress Instagram Post Modify Plugin To Add Tags


    I modified this code after quickly learning how Wordpress plugins actually work, how they're called etc.. was the first trick to modifying the code to add tags.

    Add this code after line 570 in wp-content/plugins/wp-instagram-post/classes/class-woo-igp.php
     


                                    $tags = get_the_tags($post_id);
                                    foreach( $tags as $tag )
                                    {

                                       $the_tags=$the_tags. "#". $tag->name;
                                    }


                                    $message = $message .  "$the_tags";


  • Linux input/output error invalid program cannot read data on some CD-Rs and DVD-Rs on ASUS BW-16D1HT


    I've never seen this before in all of my years.  I have some very old CDs and DVDs 12-15 years old that seem not to work in this BD-R/DVD-R/CD-R Asus drive.

    The discs are fine actually and ironically they even work fine on a normal LG USB based BD-R drive!

    Here are the errors in Linux:
    [2914936.884924] attempt to access beyond end of device
    [2914936.884927] loop1: rw=0, want=730424, limit=688384
    [2914954.556873] attempt to access beyond end of device
    [2914954.556883] loop1: rw=0, want=730328, limit=688384
    [2914954.557225] attempt to access beyond end of device
    [2914954.557230] loop1: rw=0, want=730424, limit=688384
    [2914954.560679] attempt to access beyond end of device
    [2914954.560685] loop1: rw=0, want=730328, limit=688384
    [2914954.666068] attempt to access beyond end of device
    [2914954.666081] loop1: rw=0, want=730072, limit=688384
    [2914969.467216] attempt to access beyond end of device
    [2914969.467231] loop1: rw=0, want=730072, limit=688384


    Mar 12 11:53:13 localhost kernel: [2915064.079511] VFS: busy inodes on changed media or resized disk sr0
    Mar 12 12:55:04 localhost kernel: [2918775.634645] VFS: busy inodes on changed media or resized disk sr0
    Mar 12 12:55:23 localhost kernel: [2918794.508782] VFS: busy inodes on changed media or resized disk sr0
    Mar 12 12:55:40 localhost kernel: [2918811.408231] VFS: busy inodes on changed media or resized disk sr0
    Mar 12 12:55:45 localhost kernel: [2918816.012111] VFS: busy inodes on changed media or resized disk sr0
    Mar 12 12:56:02 localhost kernel: [2918832.911498] VFS: busy inodes on changed media or resized disk sr0
    Mar 12 12:56:16 localhost kernel: [2918847.599010] VFS: busy inodes on changed media or resized disk sr0

    Basically you can read the directory structure and browse it but no actual data from any file even though the discs themselves are fine and 100% working in another drive.

    Drives in question:

    sudo wodim --devices
    wodim: Overview of accessible drives (2 found) :
    -------------------------------------------------------------------------
     0  dev='/dev/sg5'    rwrw-- : 'ASUS' 'BW-16D1HT'
     1  dev='/dev/sg4'    rwrw-- : 'HL-DT-ST' 'BD-RE WP50NB40'
    -------------------------------------------------------------------------
     

    Just to clarify again the Asus has a problem with a lot of my discs whereas the LG works with everything.  I would have thought the USB powered LG would be more likely to have issues.

    I suspect this is some firmware bug in the Asus.  For now I'll use the LG or plugin an old DVD-R SATA based drive.


  • Installing SSL Certificate with Chain Intermediary CA File


    Some of the cheaper or newer SSL suppliers will require this to work properly (otherwise you may be prompted that the cert is invalid when it's not the case but it will certainly scare off your users!).

    In the Apache vhost conf for the domain here is what you add:

    SSLCACertificateFile /path/to/your/cafile.pem

    Here is a full example of an SSL Vhost config in Apache using a CA Certificate file

    <VirtualHost *:443>
    DocumentRoot /www/vhosts/domain.com/httpdocs
    ServerName domain.com
    ServerAlias www.domain.com
    LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"" combined
    CustomLog /www/vhosts/domain.com/stats/access_log combined
    ErrorLog /www/vhosts/domain.com/stats/error_log
    #begin enable SSL
    SSLEngine on
    SSLVerifyClient none
    SSLCertificateFile /www/ssl-certs/www.domain.com-ssl-cert.crt
    SSLCertificateKeyFile /www/ssl-certs/www.domain.com-ssl-private.key

    SSLCACertificateFile /www/ssl-certs/www.domain.com-ssl-ca.crt
    #begin stop SSL
    </VirtualHost>


  • PHP Warning: Cannot load module 'XCache' because conflicting module 'apc' is already loaded in Unknown on line 0


    PHP Warning:  Cannot load module 'XCache' because conflicting module 'apc' is already loaded in Unknown on line 0

    Solution:

    yum remove php-pecl-apc-*


  • Unable to load dynamic library '/usr/lib64/php/modules/module.so' - /usr/lib64/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0


    Getting this error on Centos 6 with PHP 5.3 when just running "php -v"

     

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/module.so' - /usr/lib64/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  Cannot load module 'XCache' because conflicting module 'apc' is already loaded in Unknown on line 0

    Solution:

     This is caused by php-mcrypt and usually means your OS doesn't have mcrypt installed and Centos by default doesn't seem to have it.

    The easiest thing to do if you aren't using it is to remove it:

    yum remove php-mcrypt

    You could also edit /etc/php.d/mcrypt.ini and comment the line out and add the module back when and if you get it.


  • How to start screen in bash script or from /etc/rc.local on startup as a specific user


    It takes some tinkering the main thing is that the "-dmS" flag allows screen to start without a session which of course sudo won't have.

    solution:

    /usr/bin/sudo -u user /usr/bin/screen -dmS nameyouchoose /script/start.bash


    this doesn't work at all:

    /usr/bin/sudo -u user "/usr/bin/screen /script/start.bash"


    this doesn't work:

    /usr/bin/sudo -u user /usr/bin/screen /script/start.bash


  • Linux How To Clone One System Harddrive to another remote system


    The easiest way is to use SSH and DD or a combination of netcat.  SSH will be a little slower due to encryption but is the most secure way (on two older systems the average clone speed is about 40-50MB/s).  This is also OS independent as it doesn't matter what the source OS is because you are literallly cloning the drive so you retain the partition table and settings.


     

    Clone HDD using SSH and DD

    dd if=/dev/sourcedrive | ssh user@yourhostname.com "dd of=/dev/destinationdrive"

    However especially in Linux you'll want to do a fsck on all partitions on the remote drive or it probably won't boot because the filesystem recognizes the partitions are not right due to the different drive sizes. More info here.

    Note you will need to use sudo or root on both systems.  I also like to use a live CD/USB/Network on the remote system so that the operation can completely cleanly (especially helpful if that would be the only disk device on the remote system).

     


     

     

    Clone HDD using netcat (nc)

     

    This is the faster but less secure way someone could accidentally or maliciously send random/wrong data to the remote nc causing corruption.  There is of course the risk of eavesdropping where an attacker could essentially have a copy of your cloned hard drive too.

    First setup the remote server.

    Remote Server Setup

    nc -l 29000|dd of=/dev/destinationdrive

    This tells nc to listen on port 29000 and write the data to /dev/destinationdrive

    Now we are ready to push the source drive from the source server.

    Source Server

    dd if=/dev/sourcedrive| nc remoteserver 29000

    This tells dd to take data from /dev/sourcedrive and send it to an nc server at remoteserver on port 29000


  • Ubuntu/Debian/Linux won't boot and drops to Busybox shell after cloning HDD with dd


    I don't recall having this issue in the distant past but nowadays at least Debian seems to be very picky about this.

    I used dd to copy one hard drive to another and tried booting it.  Everything seemed fine with grub working but each time it would drop to the busybox shell.  There is no particular error so this is misleading.

    Normally the first things you would check are to make sure your fstab is correct (that the UUID is correct) and that you've updated grub.  This will not apply or be necessary if you've cloned the entire hard drive (by doing this your partitions still retain the same UUID).

    Part of the issue is likely that the filesystem thinks something is wrong since the partition table is technically going to be incorrect if you clone a 256GB drive to a 3TB for example (as in this case).

    The solution in this case is that you need to fsck the boot and root partitions.  The great news is that this can be done from the same busybox shell that you landed in.

    fsck.ext4 /dev/sda1

    After that reboot and everything should be good!


  • Unable to negotiate with 192.168.1.99 port 22: no matching host key type found. Their offer: ssh-dss Solution


    ssh rtt@192.168.1.199
    Unable to negotiate with 192.168.1.99 port 22: no matching host key type found. Their offer: ssh-dss

    It looks like the DSS option is not considered secure so when connecting from newer Linux systems to an older one you will get the above error.

    It can be fixed (but you should consider upgrading your SSH daemon):

     

    ssh -oHostKeyAlgorithms=+ssh-dss rtt@192.168.1.199 

  • Centos 7 Password Reset


    In Centos 7 the days of editing the "kernel" line and adding "single" are gone.  On top of that sometimes after a new install passwords do not work (possibly because requirements were not met but the installer never mentioned this?).

    1. 1.) On bootup edit the bootline by entering GRUB.
    2. Type e
    3. Find the line that says "linux16 /vmlinuz"
    4. Edit the part that says "ro" and change with "rw init=/sysroot/bin/sh
    5. Hit "Ctrl-X"
    6. Upon bootup type "chroot /sysroot"
    7. password
    8. touch ./autorelabel
    9. exit
    10. reboot

     


  • MySQL Adding New Field to Existing Database Table


    ALTER TABLE existingtable ADD newfieldname VARCHAR(255);


  • MySQL Cannot Update/Write to any database table solution


    This happened on Centos for no apparent reason with no obvious issue in the logs.  Data could be read fine but not written (possibly due to some corruption or out of memory issue in the OpenVZ container is the best guess).

     

    All mysql update and insert queries failed freezing without any error log on any database and table.

    Tried to restart:

    service mysqld restart
    Timeout error occurred trying to stop MySQL Daemon.
    Stopping mysqld:                                           [FAILED]
    MySQL Daemon failed to start.
    Starting mysqld:                                           [FAILED]




    #manually kill mysqld and mysqld_safe

    ps aux|grep mysqld
    root       876  0.0  0.0   3732   584 ?        S     2017   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
    mysql     1322  2.3  4.2 484384 269240 ?       Sl    2017 12779:34 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
    root      2423  0.0  0.0   2360   692 pts/2    S+   13:28   0:00 grep mysqld

    After manually killing everything seemed to work OK after that point.


  • Centos How To Update to Glibc 2.14 Plus


    Centos 6 requires GLIBC 2.12 however a lot of new programs you would want to compile may need a newer glibc.  You can't remove the old glibc since the whole OS is based on it but you can install the updated glibc alongside it and do an export pointing to your updated GLIBC.

    mkdir ~/glibc_install; cd ~/glibc_install

    wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz

    tar zxvf glibc-2.14.tar.gz

    cd glibc-2.14

    mkdir build

    cd build

    ../configure --prefix=/opt/glibc-2.14

    make -j4

    sudo make install

    export LD_LIBRARY_PATH=/opt/glibc-2.14/lib

     

    The export should be done in ~/.bashrc or /etc/profile to make it permanent otherwise programs will have unpredictable results.  If you are calling a remote/cron script that needs this GLIBC you should probably do the export in the script itself to be sure.


  • php remove last letters of string


     $title_clean = substr($title,0,-3);

    In the above example the last 3 characters will be removed from the string "$title".  You can of course have the last X removed by changing -3 to -X


  • MySQL Maximum INT Size Truncation Issue/Warning


    MySQL will silently truncate a larger INT than capable.

    Check MySQL's own documentation here:

    As we can see the maximum size of INT (which is the most commonly used) is 2147483647

    A lot of coders make this mistake by using very large values such as 9999999999 but it would actually truncate to 2147483647 which is the maximum size of an INT.  This is dangerous because any value over that would truncate to that exact maximum number causing duplicate or unintended entries.


     

    Type Storage Minimum Value Maximum Value
      (Bytes) (Signed/Unsigned) (Signed/Unsigned)
    TINYINT 1 -128 127
        0 255
    SMALLINT 2 -32768 32767
        0 65535
    MEDIUMINT 3 -8388608 8388607
        0 16777215
    INT 4 -2147483648 2147483647
        0 4294967295
    BIGINT 8 -9223372036854775808 9223372036854775807
        0 1844674407370955161

     


  • MySQL How To Add New Field Column To Existing Table


    ALTER TABLE thetable ADD newfield VARCHAR(255)

    It's very simple just specify "the table" and then the newfield type


  • mysql how to reset passwords with a few commands


    The commands below will help you reset any mysql user password.

    use mysql;

    update user set password=PASSWORD('thenewpass') where User='theusername';

    flush privileges;

     

    1. The first line says to use the "mysql" database which contains all the user info.
    2. the second update line sets the new password "thenewpass" for the user "theusername".
    3. the third line flushes privileges this is necessary otherwise the new password will not work or actually be applied.

  • htaccess apache how deny/allow to block or allow by IP address


    order deny,allow
    Deny From All
    Allow From 8.8.8.8

    A simple and quick way to improve security by only allowing specific IPs to your web application.

    In this case the above allows only the IP 8.8.8.8 to access things and everything else is denied.


  • PHP geoip.so fatal error Solution


    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/geoip.so' - /usr/lib64/php/modules/geoip.so: undefined symbol: GeoIP_country_code_by_name_v6 in Unknown on line 0

     Remove the GEOIP from PHP:

    php71w-pecl-geoip-1.1.1-1.w6.x86_64


     

    PHP Fatal error:  PHP Startup: apc_shm_create: shmget(0, 67108864, 914) failed: Invalid argument. It is possible that the chosen SHM segment size is higher than the operation system allows. Linux has usually a default limit of 32MB per segment. in Unknown on line 0
    PHP Fatal error:  PHP Startup: apc_shm_attach: shmat failed: in Unknown on line 0

    Solution

    Already found it earlier just edit sysctl kernel.shmmax

    /apc_shm_attach_shmat_failed_in_Unknown_on_line_0_apc_shm_create_shmget0_67108864_914_failed_PHP_Solution-1804-articles


  • Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or direct


    Stopping httpd:                                            [  OK  ]
    Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory
                                                               [FAILED]

     

    I actually installed PHP 7 so the file /etc/httpd/modules in php.conf should be:

    libphp5.so

     

    Apache still won't start:

     

    Stopping httpd:                                            [  OK  ]
    Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Can't locate API module structure `php5_module' in file /etc/httpd/modules/libphp7.so: /etc/httpd/modules/libphp7.so: undefined symbol: php5_module
                                                               [FAILED]
     

     

    Solution

    Look carefully at the whole "Load" line to make sure it makes sense.

    LoadModule php5_module modules/libphp7.so

    Although I updated the line to say libphp7.so I didn't notice the "Load Module php5_module" so you have to update it the final solution is this:

     

    LoadModule php7_module modules/libphp7.so


  • GCC 5 on Centos 6 - How To Install


    Install requirements:


    yum -y install gmp-devel mpfr-devel libmpc-devel glibc-devel glibc-devel.i686 zip unzip jar

     

    Download, untar, configure, compile and install GCC



    http://mirrors.kernel.org/gnu/gcc/gcc-5.5.0/gcc-5.5.0.tar.gz
    tar -zxvf gcc-5.5.0.tar.gz
    cd gcc-5.5.0
    ./configure
    make
    make install

    Now you need to cleanup the old GCC by removing it (ironically it was required to make the new GCC and now we have to toss it away!

    yum remove gcc
    rm -rf /usr/bin/gcc
    rm -rf /usr/bin/c++
    rm -rf /usr/bin/cc


    ln -s /usr/local/bin/x86_64-unknown-linux-gnu-gcc-5.5.0 /usr/bin/gcc
    ln -s /usr/local/bin/x86_64-unknown-linux-gnu-c++ /usr/bin/c++
    ln -s /usr/local/bin/x86_64-unknown-linux-gnu-gcc /usr/bin/cc


  • bash find line and replace howto


    First find the line number:

    awk '/what you are searching for/{ print NR; exit }' input-file

    86

    Now use sed to replace it:

    sed -i  86s/.*/"your replacement text"/ $file

     

    Here is a full sample script to automate it:

    file=some/file.txt
    linenum=`awk /'your search query/{ print NR; exit }' $file`
    newline=`echo -e "your new line here")`
    sed -i "$linenum"s/.*/"$newline"/ $file


  • How To Create Apache htpasswd file


    This just simply outputs what you need a username and password that can be used to authenticate from .htaccess

    htpasswd -nb user password
    user:Gnb6uE9Lp4gt2
     

    If you want to write it straight to a file

    htpasswd -cb /tmp/somefile.pw user password

    How To Use This In .htaccess

    AuthUserFile /tmp/somefile.pw
    AuthName GetLost!!
    AuthType Basic

    #make sure you require a user!

    require valid-user 

  • possible SYN flooding on ctid 42131, port 80. Sending cookies. - Solution


    The Linux Kernel interpretated a very high volume of real traffic as a DDOS attack so it basically ends up blocking your web server.

    possible SYN flooding on ctid 42131, port 80. Sending cookies.

    Simple fix edit sysctl values for max_syn_backlog
    sysctl -w net.ipv4.tcp_max_syn_backlog=5000


    To make them permanent edit /etc/sysctl.conf

    echo "net.ipv4.tcp_max_syn_backlog=5000" >> /etc/sysctl.conf


  • Linux last command show login by IP instead of hostname


    In the "last" command in Linux by default it will show the information with the hostname (not very useful at all especially since it normally truncates long hostnames).

    To get last to show the IP address use this:

    last -i

    The -i makes it show the numeric IP instead of hostname.


  • Install Windows From a Linux TFTP Server instead of using WDS Solution


    yum -y install samba
    vi /etc/samba/smb.conf

    https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.zip
    mkdir syslinux;cd syslinux;unzip syslinux-6.03.zip

    mkdir -p /tftpboot/libs/

    cp bios/com32/modules/linux.c32 /tftpboot/libs/
    cp bios/com32/libutil/libutil.c32 /tftpboot/libs/
    cp bios/com32/lib/libcom32.c32 /tftpboot/libs/

    #add lib path
    echo "PATH libs" >> /tftpboot/pxelinux.cfg/default

    cp ./bios/com32/elflink/ldlinux/ldlinux.c32 /tftpboot/

    #now get WIMBoot
    wget http://git.ipxe.org/releases/wimboot/wimboot-latest.zip
    unzip wimboot-latest.zip

    cp -va wimboot*/wimboot /tftpboot/libs/


    mkdir win2012r2
    mkdir -p /tftpboot/images/win2012r2

    mount -o loop windows-2012-r2-eval-9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO win2012r2/
    cd win2012r2/
    [root@evodal01 win2012r2]# ls
    autorun.inf  boot  bootmgr  bootmgr.efi  efi  setup.exe  sources  support


    cp bootmgr /tftpboot/images/win2012r2
    cp boot/bcd  /tftpboot/images/win2012r2
    cp boot/boot.sdi  /tftpboot/images/win2012r2
    cp sources/boot.wim /tftpboot/images/win2012r2/


    label Win2012R2
    com32 linux.c32 libs/wimboot
    APPEND wimboot initrdfile=images/win2012r2/bootmgr,images/win2012r2/bcd,images/win2012r2/boot.sdi,images/win2012r2/boot.wim

     


  • How To Secure Samba NMBD/SMBD to bind to a specific IP address


    By default Samba SMB/NMB listen on ANY and ALL IPs on your system by binding to 0.0.0.0.  Obviously this is a huge security risk if you have a public facing server with both internal and external access.  Usually when a system administrator sets up a samba server their intention is just to share with a LAN.

    To do this you need to the following options under the [global] section in smb.conf

    bind interfaces only = yes
    interfaces = 192.168.1.10
    hosts allow = 192.168.1.

    The "bind interfaces only" tells Samba to only bind to the IP specified under "interfaces".

    hosts allow is there for good measure (normally hosts allow will the only thing stopping people from the outside from accessing your samba server).  The safest way of course is to firewall on the public WAN side and to not bind to any interface or IP that you don't want to have access.

     


  • tftp: client does not accept options - solution if you are using UEFI PXEBoot disable it!


    tftp: client does not accept options

    I spent the good portion of a late evening on this double checking settings that I know always worked right for tftp!

    This error can also happen if you are trying to boot PXE in UEFI mode.  Enter your BIOS and change it to "Legacy PXE" or non-UEFI PXE mode and you'll be good to go!


  • Linux how to view video card make and exact model


    Normally lspci will show you just like this and would suggest they are exactly the same card:

    1a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/580] (rev e7)
    1c:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/580] (rev e7)

    lspci -vnn is the answer

    As we can see one is a Gigabyte and the other is an MSI card.  What's interesting about Linux is that it says what you may not already know bute the RX 470/480/570/580 are essentially the same cards/family.

    1a:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/580] [1002:67df] (rev e7) (prog-if 00 [VGA controller])
            Subsystem: Gigabyte Technology Co., Ltd Device [1458:22f1]
            Flags: bus master, fast devsel, latency 0, IRQ 33
            Memory at d0000000 (64-bit, prefetchable) [size=256M]
            Memory at e0000000 (64-bit, prefetchable) [size=2M]
            I/O ports at 2000 [size=256]
            Memory at e0300000 (32-bit, non-prefetchable) [size=256K]
            [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
            Capabilities: <access denied>
            Kernel driver in use: amdgpu
            Kernel modules: amdgpu

    1c:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/580] [1002:67df] (rev e7) (prog-if 00 [VGA controller])
            Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:3418]
            Flags: bus master, fast devsel, latency 0, IRQ 36
            Memory at b0000000 (64-bit, prefetchable) [size=256M]
            Memory at c0000000 (64-bit, prefetchable) [size=2M]
            I/O ports at 1000 [size=256]
            Memory at e0200000 (32-bit, non-prefetchable) [size=256K]
            Expansion ROM at e0260000 [disabled] [size=128K]
            Capabilities: <access denied>
            Kernel driver in use: amdgpu
            Kernel modules: amdgpu

     


  • Authentication refused: bad ownership or modes for directory /home/user SSH Public Key Authentication Failed Solution


    First of all I got this error after accidentally messing up my usergroup by using usermod -G user group

    When I would login using SSH keys it would fail:

    sshd[2020]: Authentication refused: bad ownership or modes for directory /home/one

    No worries, the fix is simple!

    chmod g-w /home/use
    
    

  • How to Update Linux /usr/share/misc/pci.ids


    This works with lspci and if it's outdated may not give you the exact manufacturer and device model.

    For example take these 3 different RX 580's:

    1a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 67df (rev e7)
    1b:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 67df (rev e7)
    1d:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 67df (rev e7)
     

    You can update it like so:

    sudo wget -O /usr/share/misc/pci.ids http://pci-ids.ucw.cz/v2.2/pci.ids

    Now try again after updating:

    1a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/580] (rev e7)
    1b:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/580] (rev e7)
    1d:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/580] (rev e7)


  • pcimodules and lspci not working alternative solution


    pcimodules no longer works it produces nothing probably because the format of /sys/bus/pci is different.

    lspci -k doesn't work on older lspci versions.

    pciutils can be compiled but it won't work if you have an old system and compile on a newer glibc.

    iteriate through /sys/bus/pci/devices/*/modalias

    cat /sys/bus/pci/devices/*/modalias
    pci:v00008086d00001237sv00000000sd00000000bc06sc00i00
    pci:v00008086d00007000sv00000000sd00000000bc06sc01i00
    pci:v00008086d00007111sv00000000sd00000000bc01sc01i8A
    pci:v000080EEd0000BEEFsv00000000sd00000000bc03sc00i00
    pci:v00008086d0000100Esv00008086sd0000001Ebc02sc00i00
    pci:v000080EEd0000CAFEsv00000000sd00000000bc08sc80i00
    pci:v00008086d00002415sv00008086sd00000000bc04sc01i00
    pci:v0000106Bd0000003Fsv00000000sd00000000bc0Csc03i10
    pci:v00008086d00007113sv00000000sd00000000bc06sc80i00




    compare it to /lib/modules/4.4.98/modules.alias
    pci:v00008086d00001237sv00000000sd00000000bc06sc00i00
    the part we care about is:
    8086d00001237 (note I now truncate more of the end so try again removing the 7 or even the 73 at the end to be more inclusive or you will have a lower success rate).


    cat /lib/modules/4.4.98/modules.alias|grep 8086d0000123
    alias pci:v00008086d00001234sv*sd*bc*sc*i* pata_mpiix
    alias pci:v00008086d00001230sv*sd*bc*sc*i* pata_oldpiix
    alias pci:v00008086d00001234sv*sd*bc*sc*i* piix
    alias pci:v00008086d00001230sv*sd*bc*sc*i* piix

    So bash to the rescue!

    iteriate through /sys/bus/pci/devices/*/modalias

    compare it to /lib/modules/4.4.98/modules.alias

     bash script that I use in my init

    #use this code to do the same thing as pcimodules
    for device in `ls -1 /sys/bus/pci/devices/`; do
       device=`cat /sys/bus/pci/devices/$device/modalias`
        #specifying 9:11 or 9:14 with 9:11 being less restrictive and presenting more options
        #9:14 drills down and is more strict giving you less chance of getting the wrong driver
       alias=${device:9:14}
       kernversion=`uname -r`
       module=`cat /lib/modules/$kernversion/modules.alias|grep $alias|awk '{print $3}'`
       if [ ! -z "$module" ]; then
         for mod in $module; do
         echo "module for $device $alias =$module"
         modprobe $module
         done
         else
         echo "No module found for $device $alias"
       fi
    done


  • How to disable Google Fonts in Wordpress


    edit theme css:

    Click "Appearance -> Editor -> Stylesheet"

    http://yourblog.com/wp-admin/theme-editor.php?file=style.css&theme=twentysixteen

    textarea {
        color: #1a1a1a;
        /*font-family: Merriweather, Georgia, serif;*/
        font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif





    line 210


    edit wp-content/themes/twentysixteen/functions.php

            //return $fonts_url;
            return 0;

    #another problem is that in the code this shows up still:
    <link rel='stylesheet' id='open-sans-css'  href='https://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&#038;subset=latin%2Clatin-ext&#038;ver=4.4.11' type='text/css' media='all' />


    edit wp-includes/script-loader.php
    line 708:


                    $open_sans_font_url = "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets";
                    $open_sans_font_url = "";


  • Unable to load dynamic library /usr/lib64/php/modules/php_openssl


     Unable to load dynamic library '/usr/lib64/php/modules/php_openssl'

    not sure how to fix this


  • mysqld in Linux hacked


    Check for crap in /var/lib/mysql like this

     

    ls -al /var/lib/mysql/
    total 20888
    drwxr-xr-x 24 mysql mysql     4096 Oct  3 18:30 .
    drwxr-xr-x 20 root  root      4096 Oct  3 04:23 ..

    -rw-rw-rw-  1 mysql mysql    11776 Oct  3 17:10 c:exp.exe
    -rw-rw-rw-  1 mysql mysql    48128 Oct  3 17:10 c:exp1.exe
    -rw-rw-rw-  1 mysql mysql    55296 Oct  3 17:10 c:exp2.exe
    -rw-rw-rw-  1 mysql mysql    33812 Oct  3 17:10 c:tan.exe
    -rw-rw-rw-  1 mysql mysql    45056 Oct  3 17:10 c:tan1.exe
     

    This happened to a client who didn't firewall their port 3306 and had a weak root password.


  • W: GPG error: http://archive.debian.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9


    W: GPG error: http://archive.debian.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9

    No clue how to fix this.


  • cannot mount kvm ntfs image


    guestmount -a kvmuserscra.img -m /dev/sda1 mount
    libguestfs: error: mount_options: /dev/sda1 on / (options: ''): mount: unknown filesystem type 'ntfs'
    guestmount: '/dev/sda1' could not be mounted.
    guestmount: Did you mean to mount one of these filesystems?
    guestmount:     /dev/sda1 (ntfs)
    guestmount:     /dev/sda2 (ntfs)



    yum -y install ntfs-3g

    still doesn't work
     


  • h264 DVR security camera footage cannot be played


    This is not just a Linux issue but a general issue most software or hardware players cannot play the resulting exported/backed up format of .h264 from DVR security camera footage for some silly reason.

    There is a simple solution in Linux using ffmpeg fortunately.

    Convert the .h264 file into mp4


    ffmpeg -i yourfile.h264 -codec copy video.mp4

     

    play dvr .h264 file

     ffplay -f h264 yourfile.h264

     


     


  • dhcpd.conf how to secure so only known and allowed clients will be given dhcpd IP address leases


    It's really simple and just a matter of the following line within the subnet declaration.

      deny unknown-clients;

    See example below:

    subnet 10.25.20.0 netmask 255.255.255.0 {
      range 10.25.20.11 10.25.20.254;
      deny unknown-clients;
      option routers 10.25.20.10;
      option domain-name-servers 208.67.222.222;

       host client05 {
       hardware ethernet aa:bb:cc:dd:ee:ff;

       }

    }

     

    After that only clients with a declared host statement will be able to get a DHCP lease increasing security a little bit.

     


  • Thunderbird E-mail List Blank White but e-mails still clickable and viewable


    In Thunderbird in a very large folder suddenly all of my e-mail list became blank/white even though you could click on the invisible/white/blank lines and it would show the e-mails.  I tried to close and reopen but only going to Folder -> Properties and clicking Repair Folder fixed it (basically it had to redownload/rebuild the entire index and all e-mails).


  • css responsive images


    add this style="background-size: contain;max-width: 100%; height: auto;" to your img code.
    Example: <img style='background-size: contain;max-width: 100%; height: auto;' src="/some/pic.jpg">

    This code is really essential because in responsive mode on a phone it will cause images to be cut off and unviewable past the width of the device.

    Another nice trick is to add this as css to the img tag based on maximum screen width (this way no html code has to be changed):

     

    @media only screen and (min-width: 300px) and (max-width:1024px) {
           img {
            background-size: contain;max-width: 100%; height: auto
               }
    }

     

    If you want to center the image use this:

    margin-left:auto;margin-right:auto

           img {
            background-size: contain;max-width: 100%; height: auto;
    margin-left:auto;margin-right:auto

               }


  • responsive table without changing much code solution


    So you've got a responsive site with tables but it breaks them so anything not viewable on the screen is now cut off.

    Here is a simple solution that will allow users to scroll horizontally so they can see the whole table:

    <div style="overflow-x:auto;">
      <table>
         <tr>

             <td></td>

         </tr>
      </table>
    </div>

     

    Basically just put it inside a div with the 'style="overflow-x:auto;".


  • yum how to install old obsolete packages


    This is important as unfortunately Centos may designate a package obsolete and the replacement breaks everything (eg. you have a config file and the new replacement is not at all compatible with it and it breaks your application).

    This is where disabling obsoletes comes into play, it can be done from yum but it doesn't work at the time I find.

    yum --setopt=obsoletes=0 install someapp  However I find it still installs the new app and not the one you ask for until the second run which is kind of pointless.
    I recommend just turning this feature off from yum.conf

    vi /etc/yum.conf

    obsoletes=0
     


  • PHP Howto Store Value of Included File Output Into Variable


    ob_start();

    include "yourfile.php";

    $stored_value=ob_get_clean();


  • PHP Migration from 5.3 to 5.4+ and dealing with deprecated functions


    Upgrading from PHP 5.3 to 5.4+ there are many challenges basic things like mysql_connect() do not work anymore.


  • ffmpeg vidstab to stabilize video


    I'm having trouble making it work on very shaky video the result seems kind of warped/blurry/fish eye like and not as good as some other examples I've seen:

    ffmpeg -i MVI_1285.MOV -vf vidstabdetect=shakiness=10:accuracy=15 -f null MVI_1285.trf
    ffmpeg -i MVI_1285.MOV -vf vidstabtransform=smoothing=30:input="transforms.trf" MVI_1285.MOV.mp4

    I've played around with the shakiness, accuracy etc.. but not the smoothing part.


  • userdel user userdel: cannot lock /etc/passwd; try again later.


    I am not sure why this happened I think it's because the file was in use by another duplicate process or script.

     userdel user
    userdel: cannot lock /etc/passwd; try again later.
     


  • mdadm how to mount inactive array


    myguy@devbox:~$ sudo mdadm -As


    myguy@devbox:~$ cat /proc/mdstat |grep sdf
    md125 : inactive sdf3[2](S)


    sudo mdadm --manage /dev/md125 --run
    mdadm: started /dev/md125



     


  • How to find and mount mdadm arrays automatically


    A great way if you have a bunch of drives and mdadm connected and are looking for backups/archives and don't know what is where!

     

     for md in `cat /proc/mdstat|grep md[0-99]|awk '{print $1}'`; do mkdir /mnt/$md; mount /dev/$md /mnt/$md; done


  • M2Crypto.SSL.Checker.WrongHost: Peer certificate subjectAltName does not match host, expected fedora-archive.ip-connect.vn.ua, got DNS:mirror.ip-connect.vn.ua


    You are using Centos 5 which is deprecated so nothing in yum will work until you follow this post to use the vault:

    http://realtechtalk.com/Centos_59_Working_Vault_Repo_file-1921-articles

    yum update
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * epel: fedora-archive.ip-connect.vn.ua
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in ?
        yummain.user_main(sys.argv[1:], exit_code=True)
      File "/usr/share/yum-cli/yummain.py", line 309, in user_main
        errcode = main(args)
      File "/usr/share/yum-cli/yummain.py", line 178, in main
        result, resultmsgs = base.doCommands()
      File "/usr/share/yum-cli/cli.py", line 345, in doCommands
        self._getTs(needTsRemove)
      File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in _getTs
        self._getTsInfo(remove_only)
      File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in _getTsInfo
        pkgSack = self.pkgSack
      File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 661, in <lambda>
        pkgSack = property(fget=lambda self: self._getSacks(),
      File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 501, in _getSacks
        self.repos.populateSack(which=repos)
      File "/usr/lib/python2.4/site-packages/yum/repos.py", line 260, in populateSack
        sack.populate(repo, mdtype, callback, cacheonly)
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
        if self._check_db_version(repo, mydbtype):
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 226, in _check_db_version
        return repo._check_db_version(mdtype)
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1229, in _check_db_version
        repoXML = self.repoXML
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1392, in <lambda>
        repoXML = property(fget=lambda self: self._getRepoXML(),
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1384, in _getRepoXML
        self._loadRepoXML(text=self)
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1374, in _loadRepoXML
        return self._groupLoadRepoXML(text, ["primary"])
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1358, in _groupLoadRepoXML
        if self._commonLoadRepoXML(text):
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1204, in _commonLoadRepoXML
        result = self._getFileRepoXML(local, text)
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 985, in _getFileRepoXML
        cache=self.http_caching == 'all')
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 822, in _getFile
        http_headers=headers,
      File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 412, in urlgrab
        return self._mirror_try(func, url, kw)
      File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 398, in _mirror_try
        return func_ref( *(fullurl,), **kwargs )
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 934, in urlgrab
        return self._retry(opts, retryfunc, url, filename)
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 852, in _retry
        r = apply(func, (opts,) + args, {})
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 920, in retryfunc
        fo = URLGrabberFileObject(url, filename, opts)
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1008, in __init__
        self._do_open()
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1091, in _do_open
        fo, hdr = self._make_request(req, opener)
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1200, in _make_request
        fo = opener.open(req)
      File "/usr/lib/python2.4/urllib2.py", line 358, in open
        response = self._open(req, data)
      File "/usr/lib/python2.4/urllib2.py", line 376, in _open
        '_open', req)
      File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.4/site-packages/M2Crypto/m2urllib2.py", line 82, in https_open
        h.request(req.get_method(), req.get_selector(), req.data, headers)
      File "/usr/lib/python2.4/httplib.py", line 810, in request
        self._send_request(method, url, body, headers)
      File "/usr/lib/python2.4/httplib.py", line 833, in _send_request
        self.endheaders()
      File "/usr/lib/python2.4/httplib.py", line 804, in endheaders
        self._send_output()
      File "/usr/lib/python2.4/httplib.py", line 685, in _send_output
        self.send(msg)
      File "/usr/lib/python2.4/httplib.py", line 652, in send
        self.connect()
      File "/usr/lib/python2.4/site-packages/M2Crypto/httpslib.py", line 47, in connect
        self.sock.connect((self.host, self.port))
      File "/usr/lib/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 159, in connect
        if not check(self.get_peer_cert(), self.addr[0]):
      File "/usr/lib/python2.4/site-packages/M2Crypto/SSL/Checker.py", line 88, in __call__
        fieldName='subjectAltName')
    M2Crypto.SSL.Checker.WrongHost: Peer certificate subjectAltName does not match host, expected fedora-archive.ip-connect.vn.ua, got DNS:mirror.ip-connect.vn.ua


  • [Wed Sep 20 15:34:44 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Sep 20 15:34:44 2017] [error] Init: Unable to read server certificate from file /www/ssl-certs/server.crt [Wed Sep 20 15:34:44 2017] [error] SSL Library Err


    [Wed Sep 20 15:34:44 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Wed Sep 20 15:34:44 2017] [error] Init: Unable to read server certificate from file /www/ssl-certs/server.crt
    [Wed Sep 20 15:34:44 2017] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
    [Wed Sep 20 15:34:44 2017] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error

    This happened when I accidentally used a .csr as a .crt.  If in doubt check the contents of the file it complains about and you may be surprised that the contents are not what they are supposed to be!

     


  • linux how to answer yes to copy


    Have you have a command ask a question such as cp or move?

    You can do this:

    echo y|cp * /tmp/othercopy

    However it may still fail if your bashrc aliases have the "-i" flag see this post here.


  • linux cp and mv will not overwrite due to alias!


    This through me for a loop when I would do a cp -rf or mv -f nothing would get overwritten even if piping y or yes to the command.

    Type alias and you'll see why:

    alias cp='cp -i'
    alias l.='ls -d .* --color=auto'
    alias ll='ls -l --color=auto'
    alias ls='ls --color=auto'
    alias mv='mv -i'
    alias rm='rm -i'

    The -i is a safeguard against messing things up but however does mess things up worse when you know what you're doing and trying to update or upgrade applications/files etc...

    alias is a built-in feature of bash where you can have an alias eg. type a command and above it will actually execute a different command or append switches transparently and automatically with you the user seeing or noticing.

    You can usually find alias entries in ~/.bashrc or if it doesn't exist in /etc/bashrc:

    cat .bashrc
    # .bashrc

    # User specific aliases and functions

    alias rm='rm -i'
    alias cp='cp -i'
    alias mv='mv -i'

    # Source global definitions
    if [ -f /etc/bashrc ]; then
        . /etc/bashrc
    fi

     

    Solution

    You can remove those aliases if you like because it really requires interaction to overwrite files based on those aliases and even piping yes/y to the answers has no impact since it is not truly interactive.


  • ERROR 2006 (HY000) at line 567: MySQL server has gone away


    mysqldump or mysql query of a larger file/table

    ERROR 2006 (HY000) at line 567: MySQL server has gone away

    Add this to /etc/my.cnf

    max_allowed_packet=64M

    service mysqld restart


  • vbulletin 4.2.5 after upgrading from 3.6 white screen fatal php errors


    The code may lead you to believe you have an incompatible template but if you are not trying to use an old template currently that is not the issue.  I actually deleted all 3.x style templates to make sure.

    What the issue is, is old plugins that are not compatible but Vbulletin does not seem to account for this except that you'll see a fatal PHP error.  You should disable all plugins and then enable one by one until you find the one that is causing the issue.

     

    [Tue Sep 26 00:54:18 2017] [error] [client 184.65.124.41] PHP Stack trace:
    [Tue Sep 26 00:54:18 2017] [error] [client 184.65.124.41] PHP   1. {main}() /www/vhosts/forums.int.com/forums/index.php:0
    [Tue Sep 26 00:54:18 2017] [error] [client 184.65.124.41] PHP   2. require() /www/vhosts/forums.int.com/forums/index.php:43
    [Tue Sep 26 00:54:18 2017] [error] [client 184.65.124.41] PHP   3. require_once() /www/vhosts/forums.int.com/forums/forum.php:67
    [Tue Sep 26 00:54:18 2017] [error] [client 184.65.124.41] PHP   4. eval() /www/vhosts/forums.int.com/forums/global.php:29
    [Tue Sep 26 00:54:18 2017] [error] [client 184.65.124.41] PHP   5. fetch_template() /www/vhosts/forums.int.com/forums/global.php(29) : eval()'d code:197
    [Tue Sep 26 00:54:18 2017] [error] [client 184.65.124.41] PHP   6. vB_Bootstrap->process_templates() /www/vhosts/forums.int.com/forums/includes/functions.php:4208
    [Tue Sep 26 00:54:18 2017] [error] [client 184.65.124.41] PHP Fatal error:  Call to a member function query_first() on null in /www/vhosts/forums.int.com/forums/includes/class_bootstrap.php(433) : eval()'d code on line 146
    [Tue Sep 26 00:54:18 2017] [error] [client 184.65.124.41] PHP Stack trace:


  • iptables v1.4.7: can't initialize iptables table `NAT': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.


    iptables -t NAT -A PREROUTING -s 24.30.44.0/24 -j DNAT --to-destination 10.10.10.1
    iptables v1.4.7: can't initialize iptables table `NAT': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.

    Solution

    # it is case sensitive "nat" and DO NOT use "NAT" or you will get this error!

    iptables -t nat -A PREROUTING -s 24.30.44.0/24 -j DNAT --to-destination 10.10.10.1


  • Linux and FreeBSD how to set time and date


    Linux Set Date
    date -s "YYYY-MM-DD HH:MM:SS"
    date -s '2014-12-25 12:34:56'

    BSD Unix Set Date

    date yymmddhhmmss
    date 170809121156


  • FreeBSD/OpenBSD OpenVPN Client error "Cannot allocate TUN/TAP dev dynamically"



    I have never had this error on Linux and this is running FreeBSD as root:


    Wed Aug  9 04:29:34 2017 us=329050 Cannot allocate TUN/TAP dev dynamically
    Wed Aug  9 04:29:34 2017 us=329832 Exiting due to fatal error

    The Solution you need a kernel module that is for some reason not automatically loaded like Linux:

    kldload if_tap


  • kdenlive - No LADSPA plugins were found! Check your LADSPA_PATH environment variable. [producer_xml] failed to load transition "qtblend"


    This happens if you are running a kdenlive script from the shell of a remote machine without using SSH "-X" forwarding and it will also cause any areas where you write text to be a white screen for that duration.

     

    melt FusionFestival.kdenlive
    No LADSPA plugins were found!

    Check your LADSPA_PATH environment variable.
    [producer_xml] failed to load transition "qtblend"
    [producer_xml] failed to load transition "qtblend"
    [producer_xml] failed to load transition "qtblend"
    +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
    |1=-10| |2= -5| |3= -2| |4= -1| |5=  0| |6=  1| |7=  2| |8=  5| |9= 10|
    +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
    +---------------------------------------------------------------------+
    |               H = back 1 minute,  L = forward 1 minute              |
    |                 h = previous frame,  l = next frame                 |
    |           g = start of clip, j = next clip, k = previous clip       |
    |                0 = restart, q = quit, space = play                  |
    +---------------------------------------------------------------------+
    WARNING: QApplication was not created in the main() thread.
    Current Position:        967

     

     

    So if executing a script remotely you have to ssh in like this:

    ssh -X user@host.com


  • /usr/bin/supermin-helper exited with error status 1. To see full error messages you may need to enable debugging. See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs at /usr/bin/virt-list-partitions line 177.


     virt-list-partitions kvmusertest.img
    /usr/bin/supermin-helper exited with error status 1.
    To see full error messages you may need to enable debugging.
    See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs at /usr/bin/virt-list-partitions line 177.


    #solution

    update-guestfs-appliance


  • Linux Unable to mount cifs/smb share in /etc/fstab


    sudo mount -a
    Unable to find suitable address.


    [35758.706993] CIFS VFS: Error connecting to socket. Aborting operation.
    [35758.707247] CIFS VFS: cifs_mount failed w/return code = -111
    [35795.476160] CIFS VFS: Error connecting to socket. Aborting operation.
    [35795.476346] CIFS VFS: cifs_mount failed w/return code = -111

    When the above happens "Unable eto find suitable address" it usually means the smb name cannot be found for some reason (perhaps the system is down or smb is not running).


  • MySQL: table is marked as crashed solultion


    myisamchk can fix it

    But be careful and use the right options to avoid losing data.  In fact if you haven't you should make a backup or at least manually copy /var/lib/mysql.

    Replace "YourDB" with the name of your database

    Replace "yourcrashedtable" with the name of your crashed table.

    The -o option is the safest and should avoid dataloss whereas -r is more aggressive and is a last option (I have lost data using -r and only discovered it later).

    myisamchk -o /var/lib/mysql/YourDB/yourcrashedtable.MYI


  • bash Linux how to get first or last letters of a word


    To get the first X letters of a word:

    It's very simple you can just pipe it to head with

    • -c 1 (gives the first letter and so on)
    • -c2 (2 gives the first 2 letters). 

     echo "dsjfsdlksjdklf;jlsd;kflasdj;kl"|head -c 2

    Returns ds
     

    To get the last X letters of a word:

    Now we use tail with -c but it works differently.  You will want to start with 2 otherwise you will get the end of the string which is nothing.

     echo "dsjfsdlksjdklf;jlsd;kflasdj;kl"|tail -c 2

    Returns "l"

     echo "dsjfsdlksjdklf;jlsd;kflasdj;kl"|tail -c 3

    Returns "kl"
     


     


  • l2tp ipsec VPN Error Sep 12 18:16:25 vps pluto[7299]: ERROR: asynchronous network error report on eth0 (sport=500) for message to 192.5.6.2 port 20640, complainant 192.5.6.2: Connection refused [errno 111, origin ICMP type 3 code 3 (not authenticated


    Sep 12 18:16:25 vps pluto[7299]: ERROR: asynchronous network error report on eth0 (sport=500) for message to 192.5.6.2 port 20640, complainant 192.5.6.2: Connection refused [errno 111, origin ICMP type 3 code 3 (not authenticated)]

    Some say changing the "leftprotoport=17/%any" will fix this but I have not found this to be the case.

    Essentially it means at least one end is blocking the ipsec packets.  Sometimes the %any allows an alternative port to be used for smart clients but generally I have not seen this fix problems (especially if a network or country is intentionally blocking ipsec packets).

     

     


  • Centos 5.9 Working Vault Repo file


    Centos 5 is not supported running yum will produce an error like this:

    YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
     Eg. Invalid release/
    removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
    Error: Cannot find a valid baseurl for repo: base

    Solution - Update this file CentOS-Base.repo

     

    # CentOS-Base.repo
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client.  You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the
    # remarked out baseurl= line instead.
    #
    #

    [base]
    name=CentOS-5.9 - Base
    #mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=os
    baseurl=http://vault.centos.org/5.9/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #released updates
    [updates]
    name=CentOS-5.9 - Updates
    #mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=updates
    baseurl=http://vault.centos.org/5.9/updates/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #additional packages that may be useful
    [extras]
    name=CentOS-5.9 - Extras
    #mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=extras
    baseurl=http://vault.centos.org/5.9/extras/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-5.9 - Plus
    #mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=centosplus
    baseurl=http://vault.centos.org/5.9/os/$basearch/centosplus/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-5.9 - Contrib
    #mirrorlist=http://mirrorlist.centos.org/?release=5.9&arch=$basearch&repo=contrib
    baseurl=http://vault.centos.org/5.9/os/$basearch/contrib/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


  • Disable SSH Password Authentication to Increase Security and Harden SSH Linux Unix Server Ubuntu Mint Centos Debian


    Just a note before you do this you should have a sure, guaranteed way into the system such as local, KVM or preferably publickey making bruteforce SSH absolutely impossible since there is no password to bruteforce and even if someone knew the password they wouldn't be able to login except from the local console (presumably you should make sure no one unauthorized has physical access).

    1. Edit /etc/ssh/sshd_config

    Find the section like this:

    #PasswordAuthentication no
     

    2. Uncomment it like so:

    PasswordAuthentication no
     

    3. Restart SSH

    After this you won't be able to login with password.

    Permission denied (publickey,gssapi-keyex,gssapi-with-mic).


  • ecryptfs how to mount or recover from a backup


    The easiest way to recover or mount an off-line ecryptfs directory is the built-in command from ecryptfs

    sudo ecryptfs-recover-private  It will find your wrapped passphrase and ask for your password and mount it in tmp.  Much easier especially when your current active OS is using ecryptfs too.
    
    This a fantastic tool when going through old backups.

  • Linux bash script to see what connected computers respond to ping


    A great way when moving your equipment to a new location, new router/switch etc to help confirm what MAC has what IP:

     

    for ip in `arp -na|awk '{print $2}'|sed s/(//g|sed s/)//g`; do
    echo ping $ip
    ping -c 1 -w 1 $ip > /dev/null
    if [ "$?" == 0 ]; then
       echo "$ip UP"
    fi

    done


  • rsync specify alternate port non-standard port than 22


    It is not obvious but the rsync --help

     rsync --help|grep port
         --port=PORT             specify double-colon alternate port number

    --port does not do anything at all actually for some strange reason it still uses 22


    You have to specify a manual ssh command to make it work:

    -e 'ssh -p 2210'

    The snippet above is what you add for port 2210 change it to whatever port you need.

    Full Example Below of Rsync using an alternative port number:

    rsync -Phaz -e 'ssh -p 2210' /somedir/ root@somehost.com:/someremotedir
     


  • Centos 6.6/6.9 KVM VM Kernel Panic On Boot - Kernel panic - not syncing: Attempted to kill init!


    I am not sure why this is happening neither the hostnode or VM changed.  All I did was reboot the hostnode and startup the Centos VM again, also note it happened with the original kernel on the VM and also the latest 6.9 kernel as of this writing as shown below.

    Host Node: Centos 6.9

    Kernel: 2.6.32-696.6.3.el6.x86_64 

    Kernel: 2.6.32-042stab123.9

    Same result in any kernel above

    =========

    VM Node: Centos 6.6 originally (this is where the error started but chrooting and upgrading did not fix it).

    Kernels: 2.6.32-504.el6.x86_64,  2.6.32-696.6.3.el6.x86_64

    I have tried different kernels on the host node and in the VM it made no difference.

    I restored the same VM image and so far it boots fine but I have not made any changes to see if it boots again.  As mentioned even chrooting into the VM and upgrading the kernel and rebuilding initramfs has not fixed it.

     

     

    Kernel panic - not syncing: Attempted to kill init!

    Pid: 1, comm: init Not tained 2.32-696.6.3.el6.x86_64 #1

    Call Trace:

    [] ? panic+0xa7x0x179

    [] ? perf_event_exit_task<+0xc0/0x340

    [] ? do_group_exit+0x0/0xd0

    [] ? fput+0x25/0x30

    [] ? do_group_exit+0x58/0xd0

    [] ? sys_exit_group+0x17/0x20

    [] ? system_call_fastpath+0x16/0x1b


  • Cannot allocate TUN/TAP dev dynamically - FreeBSD/OpenBSD OpenVPN Client error Solution


    I have never had this error on Linux and this is running FreeBSD as root:


    Wed Aug  9 04:29:34 2017 us=329050 Cannot allocate TUN/TAP dev dynamically
    Wed Aug  9 04:29:34 2017 us=329832 Exiting due to fatal error


    The Solution

    You need a kernel module that is for some reason not automatically loaded like Linux:

    kldload if_tap


  • Linux Mint/Ubuntu/Debian apt how to downgrade a package


    First of all check to see which version if any you have available for a downgrade:

    apt-cache showpkg packagename

    Downgrade/Install old package:

    apt-get install package=version

    Example

    apt-cache showpkg caja
    Package: caja
    Versions:
    1.10.3-1+rafaela (/var/lib/apt/lists/packages.linuxmint.com_dists_rafaela_import_binary-amd64_Packages) (/var/lib/dpkg/status)
     Description Language:
                     File: /var/lib/apt/lists/packages.linuxmint.com_dists_rafaela_import_binary-amd64_Packages
                      MD5: 2d27e6d6f085ec92e7532bd116bd9d0a


    apt-get install caja=1.10.3-1+rafaela


  • Ubuntu Linux Mint How To Exclude Stop Package from being Upgraded or Installed


    In Debian/Ubuntu this is called "holding".

    To hold/exclude a package from being installed or upgraded:

    sudo apt-mark hold packagename

    To allow the upgrade/installation unhold:

    sudo apt-mark unhold packagename


  • Intel NUC Lower Power Green Computing Boxes Review/Comparison of J3160 and J3455 Models


    Intel NUC J3455 vs Vorke V1 J3160

    Both are excellent units but the J3160 is nicer if you require even lower power usage (6W vs the Intel 10W).  The price is attractive on the Vorke V1 as well.  It's been said that the Intel J3455 NUC has a buggy BIOS and some other issues that require attention.

    The Intel J3455 is still nice because it has 2 RAM slots but it does get hotter due to lack of fan.

    The Vorke V1 runs cooler, uses less power and seems to run well out of the box.

    The only consideration that should be given is really power, cost and the biggest feature the Vorke V1 loses out on is the single RAM slot which makes this a tossup and close tie.

    Both are excellent units, if the single RAM slot on Vorke V1 is not an issue then go for it as the Vorke V1 does the rest better with less power and heat to boot.

     

     

     

     

     

    Amazon Affiliate links where we've purchased these boxes from:

    The more expensive one comes with RAM and HDD already.


  • How to backup entire computer Linux Mint Ubuntu with tar


     sudo tar --ignore-failed-read  -czvf mycomputer-backup.tar.gz --exclude=/home/otheruser/* --exclude=/proc/* --exclude=/sys/* /

    Note the --exclude clauses and modify/add according to your needs


  • tar how to ignore failed reads and not exit


    This is an important feature a failed read can genuinely occur if a temporary file has been removed or if you try backing up a sysetm file in /proc /sys (which you shouldn't really anyway).

    The way to fix this is the following switch:

    --ignore-failed-read
     

    Example:

    sudo tar --ignore-failed-read  -czvf mycomputer-backup.tar.gz --exclude=/home/otheruser/* --exclude=/proc/* --exclude=/sys/* /


  • kdenlive titles/text renders as white screen when using .sh script


    When using the .sh script the rendering doesn't work after an upgrade of related packages to kdenlive.

     

    kdenlive (kdenlive:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1)) with affine or composite transitions was fine but is now broken during the time of transition it is just a white screen.


    The previous version was fine:

    kdenlive:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1

    But now I can't find it or install it:

    kdenlive-4:17.04.1+git201705191233~ubuntu16.04.1

    sudo apt-get install kdenlive-4:17.04.1+git201705191233~ubuntu16.04.1
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    E: Unable to locate package kdenlive-4:17.04.1+git201705191233~ubuntu16.04.1
    E: Couldn't find any package by glob 'kdenlive-4:17.04.1+git201705191233~ubuntu16.04.1'
    E: Couldn't find any package by regex 'kdenlive-4:17.04.1+git201705191233~ubuntu16.04.1'


    https://code.launchpad.net/~kdenlive/+archive/ubuntu/kdenlive-testing/+recipebuild/1376479
    https://code.launchpad.net/~kdenlive/+archive/ubuntu/kdenlive-testing/+build/12622720


    #found old version here
    https://launchpad.net/~kdenlive/+archive/ubuntu/kdenlive-stable/+sourcepub/7824259/+listing-archive-extra

    #remove new version
    sudo apt-get remove kdenlive kdenlive-data

    #download old version
    wget https://launchpad.net/~kdenlive/+archive/ubuntu/kdenlive-stable/+files/kdenlive-data_17.04.1+git201705191233~ubuntu16.04.1_all.deb
    wget https://launchpad.net/~kdenlive/+archive/ubuntu/kdenlive-stable/+files/kdenlive-dbg_17.04.1+git201705191233~ubuntu16.04.1_amd64.deb
    wget https://launchpad.net/~kdenlive/+archive/ubuntu/kdenlive-stable/+files/kdenlive_17.04.1+git201705191233~ubuntu16.04.1_amd64.deb

    sudo dpkg -i kdenlive-data_17.04.1+git201705191233~ubuntu16.04.1_all.deb
    sudo dpkg -i kdenlive_17.04.1+git201705191233~ubuntu16.04.1_amd64.deb

    #downgraded kdenlive same white screen problem but only with the .sh script and not "render to file"
    original melt
    melt:amd64 (6.0.0-2, 6.5+git201704252005~ubuntu16.04.1)
    melt:amd64 (6.0.0-2, automatic)

     libmlt++3:amd64 (6.0.0-2, 6.5+git201704252005~ubuntu16.04.1), libmlt6:amd64 (6.0.0-2, 6.5+git201704252005~ubuntu16.04.1)
    Remove: libavcodec-ffmpeg56:amd64 (7:2.8.11-0ubuntu0.16.04.1), libavcodec-ffmpeg56:i386 (7:2.8.11-0ubuntu0.16.04.1)
     libmlt++3:amd64 (6.0.0-2, 6.5+git201704252005~ubuntu16.04.1), libmlt6:amd64 (6.0.0-2, 6.5+git201704252005~ubuntu16.04.1)

    #in general here is what was installed and things went wrong with the white screen after these were installed:
    =============================

    Start-Date: 2017-07-31  10:50:51
    Requested-By: user (1000)
    Upgrade: libgssapi3-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1, 1.7~git20150920+dfsg-4ubuntu1.16.04.1), libfwup0:amd64 (0.5-2ubuntu4, 0.5-2ubuntu5), libwind0-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1, 1.7~git20150920+dfsg-4ubuntu1.16
    .04.1), update-manager-core:amd64 (1:16.04.6, 1:16.04.7), libdrm-nouveau2:amd64 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), libdrm-nouveau2:i386 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), whoopsie:amd64 (0.2.52.3, 0.2.52.5),
    python-samba:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8, 2:4.3.11+dfsg-0ubuntu0.16.04.9), linux-libc-dev:amd64 (4.4.0-83.106, 4.4.0-87.110), xserver-common:amd64 (2:1.18.4-0ubuntu0.2, 2:1.18.4-0ubuntu0.3), libwacom-common:amd64 (0.18-1, 0.22-1
    ~ubuntu16.04.1), libapt-inst2.0:amd64 (1.2.20, 1.2.24), openjdk-8-jre:amd64 (8u131-b11-0ubuntu1.16.04.2, 8u131-b11-2ubuntu1.16.04.2), ruby2.3:amd64 (2.3.1-2~16.04, 2.3.1-2~16.04.2), xserver-xorg-core:amd64 (2:1.18.4-0ubuntu0.2, 2:1.18.4-0
    ubuntu0.3), imagemagick:amd64 (8:6.8.9.9-7ubuntu5.7, 8:6.8.9.9-7ubuntu5.9), libwbclient0:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8, 2:4.3.11+dfsg-0ubuntu0.16.04.9), libsystemd0:amd64 (229-4ubuntu17, 229-4ubuntu19), libsystemd0:i386 (229-4ubun
    tu17, 229-4ubuntu19), grub-common:amd64 (2.02~beta2-36ubuntu3.11, 2.02~beta2-36ubuntu3.12), apt:amd64 (1.2.20, 1.2.24), kpartx:amd64 (0.5.0+git1.656f8865-5ubuntu2.4, 0.5.0+git1.656f8865-5ubuntu2.5), libheimntlm0-heimdal:amd64 (1.7~git2015
    0920+dfsg-4ubuntu1, 1.7~git20150920+dfsg-4ubuntu1.16.04.1), libkmod2:amd64 (22-1ubuntu4, 22-1ubuntu5), samba:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8, 2:4.3.11+dfsg-0ubuntu0.16.04.9), binutils:amd64 (2.26.1-1ubuntu1~16.04.3, 2.26.1-1ubuntu1~
    16.04.4), libmagickwand-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.7, 8:6.8.9.9-7ubuntu5.9), libwhoopsie0:amd64 (0.2.52.3, 0.2.52.5), sudo:amd64 (1.8.16-0ubuntu1.4, 1.8.16-0ubuntu1.5), libheimbase1-heimdal:amd64 (1.7~git201
    50920+dfsg-4ubuntu1, 1.7~git20150920+dfsg-4ubuntu1.16.04.1), xfonts-utils:amd64 (1:7.7+3, 1:7.7+3ubuntu0.16.04.2), gdb:amd64 (7.11.1-0ubuntu1~16.04, 7.11.1-0ubuntu1~16.5), grub2-common:amd64 (2.02~beta2-36ubuntu3.11, 2.02~beta2-36ubuntu3.12), udev:amd64 (229-4ubuntu17, 229-4ubuntu19), libepoxy0:amd64 (1.3.1-1ubuntu0.16.04.1, 1.3.1-1ubuntu0.16.04.2), libapt-pkg5.0:amd64 (1.2.20, 1.2.24), grub-pc:amd64 (2.02~beta2-36ubuntu3.11, 2.02~beta2-36ubuntu3.12), apache2-data:amd64 (2.4.18-2ubuntu3.3, 2.4.18-2ubuntu3.4), fwupdate:amd64 (0.5-2ubuntu4, 0.5-2ubuntu5), kpartx-boot:amd64 (0.5.0+git1.656f8865-5ubuntu2.4, 0.5.0+git1.656f8865-5ubuntu2.5), libexpat1:amd64 (2.1.0-7ubuntu0.16.04.2, 2.1.0-7ubuntu0.16.04.3), libexpat1:i386 (2.1.0-7ubuntu0.16.04.2, 2.1.0-7ubuntu0.16.04.3), kmod:amd64 (22-1ubuntu4, 22-1ubuntu5), libudev1:amd64 (229-4ubuntu17, 229-4ubuntu19), libudev1:i386 (229-4ubuntu17, 229-4ubuntu19), libwayland-client0:amd64 (1.9.0-1, 1.12.0-1~ubuntu16.04.1), kdenlive:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1, 4:17.04.3+git201707101839~ubuntu16.04.1), ntp:amd64 (1:4.2.8p4+dfsg-3ubuntu5.5, 1:4.2.8p4+dfsg-3ubuntu5.6), samba-libs:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8, 2:4.3.11+dfsg-0ubuntu0.16.04.9), grub-pc-bin:amd64 (2.02~beta2-36ubuntu3.11, 2.02~beta2-36ubuntu3.12), ntpdate:amd64 (1:4.2.8p4+dfsg-3ubuntu5.5, 1:4.2.8p4+dfsg-3ubuntu5.6), libappstream-glib8:amd64 (0.5.13-1ubuntu4, 0.5.13-1ubuntu5), x11proto-core-dev:amd64 (7.0.28-2ubuntu1, 7.0.31-1~ubuntu16.04.1), libdrm-amdgpu1:amd64 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), libdrm-amdgpu1:i386 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), imagemagick-6.q16:amd64 (8:6.8.9.9-7ubuntu5.7, 8:6.8.9.9-7ubuntu5.9), kdenlive-data:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1, 4:17.04.3+git201707101839~ubuntu16.04.1), python3-distupgrade:amd64 (1:16.04.21, 1:16.04.22), python3-update-manager:amd64 (1:16.04.6, 1:16.04.7), libruby2.3:amd64 (2.3.1-2~16.04, 2.3.1-2~16.04.2), ubuntu-release-upgrader-core:amd64 (1:16.04.21, 1:16.04.22), module-init-tools:amd64 (22-1ubuntu4, 22-1ubuntu5), samba-common:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8, 2:4.3.11+dfsg-0ubuntu0.16.04.9), systemd-sysv:amd64 (229-4ubuntu17, 229-4ubuntu19), libhcrypto4-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1, 1.7~git20150920+dfsg-4ubuntu1.16.04.1), libpam-systemd:amd64 (229-4ubuntu17, 229-4ubuntu19), libxfont1:amd64 (1:1.5.1-1, 1:1.5.1-1ubuntu0.16.04.1), libdrm2:amd64 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), libdrm2:i386 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), systemd:amd64 (229-4ubuntu17, 229-4ubuntu19), apt-utils:amd64 (1.2.20, 1.2.24), libsmbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8, 2:4.3.11+dfsg-0ubuntu0.16.04.9), smbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8, 2:4.3.11+dfsg-0ubuntu0.16.04.9), samba-common-bin:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8, 2:4.3.11+dfsg-0ubuntu0.16.04.9), libmagickcore-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.7, 8:6.8.9.9-7ubuntu5.9), openjdk-8-jre-headless:amd64 (8u131-b11-0ubuntu1.16.04.2, 8u131-b11-2ubuntu1.16.04.2), libdrm-intel1:amd64 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), libdrm-intel1:i386 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), libwacom2:amd64 (0.18-1, 0.22-1~ubuntu16.04.1), libroken18-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1, 1.7~git20150920+dfsg-4ubuntu1.16.04.1), apache2-bin:amd64 (2.4.18-2ubuntu3.3, 2.4.18-2ubuntu3.4), imagemagick-common:amd64 (8:6.8.9.9-7ubuntu5.7, 8:6.8.9.9-7ubuntu5.9), libasn1-8-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1, 1.7~git20150920+dfsg-4ubuntu1.16.04.1), libmagick++-6.q16-5v5:amd64 (8:6.8.9.9-7ubuntu5.7, 8:6.8.9.9-7ubuntu5.9), libkrb5-26-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1, 1.7~git20150920+dfsg-4ubuntu1.16.04.1), apt-transport-https:amd64 (1.2.20, 1.2.24), libdrm-radeon1:amd64 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), libdrm-radeon1:i386 (2.4.70-1~ubuntu16.04.1, 2.4.76-1~ubuntu16.04.1), apache2:amd64 (2.4.18-2ubuntu3.3, 2.4.18-2ubuntu3.4), apache2-utils:amd64 (2.4.18-2ubuntu3.3, 2.4.18-2ubuntu3.4), libhx509-5-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1, 1.7~git20150920+dfsg-4ubuntu1.16.04.1), archdetect-deb:amd64 (1.117ubuntu2.1, 1.117ubuntu2.2), libwayland-server0:amd64 (1.9.0-1, 1.12.0-1~ubuntu16.04.1), libwayland-cursor0:amd64 (1.9.0-1, 1.12.0-1~ubuntu16.04.1)
    End-Date: 2017-07-31  10:53:53
    ~



     libfwup0:amd64 (0.5-2ubuntu4
     libwind0-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     update-manager-core:amd64 (1:16.04.6
     libdrm-nouveau2:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm-nouveau2:i386 (2.4.70-1~ubuntu16.04.1
     whoopsie:amd64 (0.2.52.3
     linux-libc-dev:amd64 (4.4.0-83.106
     xserver-common:amd64 (2:1.18.4-0ubuntu0.2
     libwacom-common:amd64 (0.18-1
     libapt-inst2.0:amd64 (1.2.20
     openjdk-8-jre:amd64 (8u131-b11-0ubuntu1.16.04.2
     ruby2.3:amd64 (2.3.1-2~16.04
     xserver-xorg-core:amd64 (2:1.18.4-0ubuntu0.2
     imagemagick:amd64 (8:6.8.9.9-7ubuntu5.7
     libwbclient0:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     libsystemd0:amd64 (229-4ubuntu17
     libsystemd0:i386 (229-4ubun
     grub-common:amd64 (2.02~beta2-36ubuntu3.11
     apt:amd64 (1.2.20
     kpartx:amd64 (0.5.0+git1.656f8865-5ubuntu2.4
     libheimntlm0-heimdal:amd64 (1.7~git2015
     libkmod2:amd64 (22-1ubuntu4
     samba:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     binutils:amd64 (2.26.1-1ubuntu1~16.04.3
     libmagickwand-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.7
     libwhoopsie0:amd64 (0.2.52.3
     sudo:amd64 (1.8.16-0ubuntu1.4
     libheimbase1-heimdal:amd64 (1.7~git201
     xfonts-utils:amd64 (1:7.7+3
     gdb:amd64 (7.11.1-0ubuntu1~16.04
     grub2-common:amd64 (2.02~beta2-36ubuntu3.11
     udev:amd64 (229-4ubuntu17
     libepoxy0:amd64 (1.3.1-1ubuntu0.16.04.1
     libapt-pkg5.0:amd64 (1.2.20
     grub-pc:amd64 (2.02~beta2-36ubuntu3.11
     apache2-data:amd64 (2.4.18-2ubuntu3.3
     fwupdate:amd64 (0.5-2ubuntu4
     kpartx-boot:amd64 (0.5.0+git1.656f8865-5ubuntu2.4
     libexpat1:amd64 (2.1.0-7ubuntu0.16.04.2
     libexpat1:i386 (2.1.0-7ubuntu0.16.04.2
     kmod:amd64 (22-1ubuntu4
     libudev1:amd64 (229-4ubuntu17
     libudev1:i386 (229-4ubuntu17
     libwayland-client0:amd64 (1.9.0-1
     kdenlive:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1
     ntp:amd64 (1:4.2.8p4+dfsg-3ubuntu5.5
     samba-libs:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     grub-pc-bin:amd64 (2.02~beta2-36ubuntu3.11
     ntpdate:amd64 (1:4.2.8p4+dfsg-3ubuntu5.5
     libappstream-glib8:amd64 (0.5.13-1ubuntu4
     x11proto-core-dev:amd64 (7.0.28-2ubuntu1
     libdrm-amdgpu1:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm-amdgpu1:i386 (2.4.70-1~ubuntu16.04.1
     imagemagick-6.q16:amd64 (8:6.8.9.9-7ubuntu5.7
     kdenlive-data:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1
     python3-distupgrade:amd64 (1:16.04.21
     python3-update-manager:amd64 (1:16.04.6
     libruby2.3:amd64 (2.3.1-2~16.04
     ubuntu-release-upgrader-core:amd64 (1:16.04.21
     module-init-tools:amd64 (22-1ubuntu4
     samba-common:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     systemd-sysv:amd64 (229-4ubuntu17
     libhcrypto4-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     libpam-systemd:amd64 (229-4ubuntu17
     libxfont1:amd64 (1:1.5.1-1
     libdrm2:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm2:i386 (2.4.70-1~ubuntu16.04.1
     systemd:amd64 (229-4ubuntu17
     apt-utils:amd64 (1.2.20
     libsmbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     smbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     samba-common-bin:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     libmagickcore-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.7
     openjdk-8-jre-headless:amd64 (8u131-b11-0ubuntu1.16.04.2
     libdrm-intel1:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm-intel1:i386 (2.4.70-1~ubuntu16.04.1
     libwacom2:amd64 (0.18-1
     libroken18-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     apache2-bin:amd64 (2.4.18-2ubuntu3.3
     imagemagick-common:amd64 (8:6.8.9.9-7ubuntu5.7
     libasn1-8-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     libmagick++-6.q16-5v5:amd64 (8:6.8.9.9-7ubuntu5.7
     libkrb5-26-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     apt-transport-https:amd64 (1.2.20
     libdrm-radeon1:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm-radeon1:i386 (2.4.70-1~ubuntu16.04.1
     apache2:amd64 (2.4.18-2ubuntu3.3
     apache2-utils:amd64 (2.4.18-2ubuntu3.3
     libhx509-5-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     archdetect-deb:amd64 (1.117ubuntu2.1
     libwayland-server0:amd64 (1.9.0-1
     libwayland-cursor0:amd64 (1.9.0-1

    ===
    sorted
    ===

     apache2:amd64 (2.4.18-2ubuntu3.3
     apache2-bin:amd64 (2.4.18-2ubuntu3.3
     apache2-data:amd64 (2.4.18-2ubuntu3.3
     apache2-utils:amd64 (2.4.18-2ubuntu3.3
     apt:amd64 (1.2.20
     apt-transport-https:amd64 (1.2.20
     apt-utils:amd64 (1.2.20
     archdetect-deb:amd64 (1.117ubuntu2.1
     binutils:amd64 (2.26.1-1ubuntu1~16.04.3
     fwupdate:amd64 (0.5-2ubuntu4
     gdb:amd64 (7.11.1-0ubuntu1~16.04
     grub2-common:amd64 (2.02~beta2-36ubuntu3.11
     grub-common:amd64 (2.02~beta2-36ubuntu3.11
     grub-pc:amd64 (2.02~beta2-36ubuntu3.11
     grub-pc-bin:amd64 (2.02~beta2-36ubuntu3.11
     imagemagick-6.q16:amd64 (8:6.8.9.9-7ubuntu5.7
     imagemagick:amd64 (8:6.8.9.9-7ubuntu5.7
     imagemagick-common:amd64 (8:6.8.9.9-7ubuntu5.7
     kdenlive:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1
     kdenlive-data:amd64 (4:17.04.1+git201705191233~ubuntu16.04.1
     kmod:amd64 (22-1ubuntu4
     kpartx:amd64 (0.5.0+git1.656f8865-5ubuntu2.4
     kpartx-boot:amd64 (0.5.0+git1.656f8865-5ubuntu2.4
     libappstream-glib8:amd64 (0.5.13-1ubuntu4
     libapt-inst2.0:amd64 (1.2.20
     libapt-pkg5.0:amd64 (1.2.20
     libasn1-8-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     libdrm2:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm2:i386 (2.4.70-1~ubuntu16.04.1
     libdrm-amdgpu1:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm-amdgpu1:i386 (2.4.70-1~ubuntu16.04.1
     libdrm-intel1:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm-intel1:i386 (2.4.70-1~ubuntu16.04.1
     libdrm-nouveau2:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm-nouveau2:i386 (2.4.70-1~ubuntu16.04.1
     libdrm-radeon1:amd64 (2.4.70-1~ubuntu16.04.1
     libdrm-radeon1:i386 (2.4.70-1~ubuntu16.04.1
     libepoxy0:amd64 (1.3.1-1ubuntu0.16.04.1
     libexpat1:amd64 (2.1.0-7ubuntu0.16.04.2
     libexpat1:i386 (2.1.0-7ubuntu0.16.04.2
     libfwup0:amd64 (0.5-2ubuntu4
     libhcrypto4-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     libheimbase1-heimdal:amd64 (1.7~git201
     libheimntlm0-heimdal:amd64 (1.7~git2015
     libhx509-5-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     libkmod2:amd64 (22-1ubuntu4
     libkrb5-26-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     libmagick++-6.q16-5v5:amd64 (8:6.8.9.9-7ubuntu5.7
     libmagickcore-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.7
     libmagickwand-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.7
     libpam-systemd:amd64 (229-4ubuntu17
     libroken18-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     libruby2.3:amd64 (2.3.1-2~16.04
     libsmbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     libsystemd0:amd64 (229-4ubuntu17
     libsystemd0:i386 (229-4ubun
     libudev1:amd64 (229-4ubuntu17
     libudev1:i386 (229-4ubuntu17
     libwacom2:amd64 (0.18-1
     libwacom-common:amd64 (0.18-1
     libwayland-client0:amd64 (1.9.0-1
     libwayland-cursor0:amd64 (1.9.0-1
     libwayland-server0:amd64 (1.9.0-1
     libwbclient0:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     libwhoopsie0:amd64 (0.2.52.3
     libwind0-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1
     libxfont1:amd64 (1:1.5.1-1
     linux-libc-dev:amd64 (4.4.0-83.106
     module-init-tools:amd64 (22-1ubuntu4
     ntp:amd64 (1:4.2.8p4+dfsg-3ubuntu5.5
     ntpdate:amd64 (1:4.2.8p4+dfsg-3ubuntu5.5
     openjdk-8-jre:amd64 (8u131-b11-0ubuntu1.16.04.2
     openjdk-8-jre-headless:amd64 (8u131-b11-0ubuntu1.16.04.2
     python3-distupgrade:amd64 (1:16.04.21
     python3-update-manager:amd64 (1:16.04.6
     ruby2.3:amd64 (2.3.1-2~16.04
     samba:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     samba-common:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     samba-common-bin:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     samba-libs:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     smbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.8
     sudo:amd64 (1.8.16-0ubuntu1.4
     systemd:amd64 (229-4ubuntu17
     systemd-sysv:amd64 (229-4ubuntu17
     ubuntu-release-upgrader-core:amd64 (1:16.04.21
     udev:amd64 (229-4ubuntu17
     update-manager-core:amd64 (1:16.04.6
     whoopsie:amd64 (0.2.52.3
     x11proto-core-dev:amd64 (7.0.28-2ubuntu1
     xfonts-utils:amd64 (1:7.7+3
     xserver-common:amd64 (2:1.18.4-0ubuntu0.2
     xserver-xorg-core:amd64 (2:1.18.4-0ubuntu0.2


    #downgrade melt
    sudo apt-get install melt=6.0.0-2


  • [1035724.274610] [drm:intel_pipe_update_end [i915_bpo]] *ERROR* Atomic update failure on pipe A (start=62076478 end=62076479) time 102 us, min 894, max 899, scanline start 893, end 900 W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1.bin


    [1035724.274610] [drm:intel_pipe_update_end [i915_bpo]] *ERROR* Atomic update failure on pipe A (start=62076478 end=62076479) time 102 us, min 894, max 899, scanline start 893, end 900

    W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1.bin for module i915_bpo

     

    I've been getting those errors on a J3455 NUC box with the latest kernel on Linux Mint 18.2.  When updating the initramfs I also got the error about the firmware included.

    In general it looks like there is a lack of Linux support or a bug in the driver and this seems to cause the screen to go blank/black and lockup after a few days.  The system itself is running and available by SSH.

    As a temp fix you can run this:

    sudo service mdm restart but be warned this will result in all of your programs closing that were running so unsaved changes would be lost.  The above command will restart mdm and allow you to login and work as normal again.


  • ffmpeg how to watermark and concatenate in one command


    If you were in my boat you were frustrated that you had to double encode, eg. one separate encode for watermark and a separate from concat and it's not easy to figure out this with ffmpeg on your own.  However it is a nice way to save time!

    ffmpeg -i file1.mp4 -i file2.mp4 -i file3.mp4 -i watermark.png -filter_complex "[0:v]setpts=PTS-STARTPTS[v0]; [1:v]setpts=PTS-STARTPTS[v1]; [2:v]setpts=PTS-STARTPTS[v2]; [v0][0:a][v1][1:a][v2][2:a]concat=n=3:v=1:a=1[v][aout]; [v][3:v]overlay=W-w-10:10[vout]" -map "[vout]" -map "[aout]" -crf 20 output.mp4

    Of course file1.mp4 file2.mp4 file3.mp4 are your source videos you are concatenating (in that order) and the watermark.png is your watermark.   The overaly W-w-10:10 sets your mark on the top right.

    To overlay on the bottom right: W-w-25:H-h-25

    I also added "-crf 20" as the default is 23.  In general the higher the number the faster the encode but lower the quality.  I found 20 is a good medium.  A good test is that if your output video is smaller than your input you have lost quality.  Try to experiment with crf until you get a size the same or slightly larger than your original input.

     


  • /usr/bin/ld: cannot find -lboost_system-mt-s /usr/bin/ld: cannot find -lboost_filesystem-mt-s /usr/bin/ld: cannot find -lboost_program_options-mt-s /usr/bin/ld: cannot find -lboost_thread-mt-s collect2: error: ld returned 1 exit status make: *** [cag


    cagecoin linux compile:


    sudo apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev
            libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev
            libssl-dev libdb++-dev libminiupnpc-dev

    Solution:

     sed -i s/"BOOST_LIB_SUFFIX=-mt-s"/"#BOOST_LIB_SUFFIX=-mt-s"/ cagecoin-qt.pro
     



    qmake
    make

     -L/home/ubuntu/build/openssl-1.0.1g -lssl -lcrypto -ldb_cxx -lboost_system-mt-s -lboost_filesystem-mt-s -lboost_program_options-mt-s -lboost_thread-mt-s -lQtGui -lQtCore -lpthread
    /usr/bin/ld: cannot find -lboost_system-mt-s
    /usr/bin/ld: cannot find -lboost_filesystem-mt-s
    /usr/bin/ld: cannot find -lboost_program_options-mt-s
    /usr/bin/ld: cannot find -lboost_thread-mt-s
    collect2: error: ld returned 1 exit status
    make: *** [cagecoin-qt] Error 1

    #troubleshoot
     ld -lboost_system-mt-s --verbose



    libboost-filesystem-dev
    libboost-system-dev
    libboost-program-options-dev
    libboost-thread-dev
    attempt to open /usr/x86_64-linux-gnu/lib64/libboost_system-mt-s.so failed
    attempt to open /usr/x86_64-linux-gnu/lib64/libboost_system-mt-s.a failed
    attempt to open //usr/local/lib/x86_64-linux-gnu/libboost_system-mt-s.so failed
    attempt to open //usr/local/lib/x86_64-linux-gnu/libboost_system-mt-s.a failed
    attempt to open //usr/local/lib64/libboost_system-mt-s.so failed
    attempt to open //usr/local/lib64/libboost_system-mt-s.a failed
    attempt to open //lib/x86_64-linux-gnu/libboost_system-mt-s.so failed
    attempt to open //lib/x86_64-linux-gnu/libboost_system-mt-s.a failed
    attempt to open //lib64/libboost_system-mt-s.so failed
    attempt to open //lib64/libboost_system-mt-s.a failed
    attempt to open //usr/lib/x86_64-linux-gnu/libboost_system-mt-s.so failed
    attempt to open //usr/lib/x86_64-linux-gnu/libboost_system-mt-s.a failed
    attempt to open //usr/lib64/libboost_system-mt-s.so failed
    attempt to open //usr/lib64/libboost_system-mt-s.a failed
    attempt to open //usr/local/lib/libboost_system-mt-s.so failed
    attempt to open //usr/local/lib/libboost_system-mt-s.a failed
    attempt to open //lib/libboost_system-mt-s.so failed
    attempt to open //lib/libboost_system-mt-s.a failed
    attempt to open //usr/lib/libboost_system-mt-s.so failed
    attempt to open //usr/lib/libboost_system-mt-s.a failed
    ld: cannot find -lboost_system-mt-s



    sudo apt-get install qt4-default qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libdb++-dev libssl-dev libminiupnpc-dev libminiupnpc8
     


  • Wine uninstalled broken on Linux Mint


    Solution:

    Aptitude is very smart and fixed the issues it was because of nvidia cuda and opencl and nothing else suggested or hinted this using apt


    sudo aptitude install wine
    The following NEW packages will be installed:
      ocl-icd-libopencl1{ab} ocl-icd-libopencl1:i386{ab} wine wine1.6
      wine1.6-amd64{a} wine1.6-i386:i386{a}
    The following packages will be REMOVED:
      kdenlive-data{u}
    The following packages are RECOMMENDED but will NOT be installed:
      fonts-horai-umefont fonts-unfonts-core libcapi20-3 libgif4:i386
      libosmesa6 libosmesa6:i386 libp11-kit-gnome-keyring:i386
      p11-kit-modules:i386 unixodbc unixodbc:i386 winbind wine-gecko2.21
      wine-gecko2.21:i386 wine-mono0.0.8 winetricks
    0 packages upgraded, 6 newly installed, 1 to remove and 56 not upgraded.
    Need to get 32.5 MB of archives. After unpacking 235 MB will be used.
    The following packages have unmet dependencies:
     ocl-icd-libopencl1 : Conflicts: libopencl1 which is a virtual package.
     ocl-icd-libopencl1:i386 : Conflicts: libopencl1 which is a virtual package.
     nvidia-libopencl1-340 : Conflicts: libopencl1 which is a virtual package.
                             Conflicts: libopencl1:i386 which is a virtual package.
    The following actions will resolve these dependencies:

         Remove the following packages:
    1)     nvidia-cuda-toolkit        
    2)     nvidia-libopencl1-331      
    3)     nvidia-libopencl1-340      
    4)     nvidia-opencl-dev          



    Accept this solution? [Y/n/q/?]

     

     

    Work:

    ============

    Somehow my wine install became uninstalled and cannot be reinstalled:

     

    sudo apt-get install wine
    [sudo] password for one:
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help resolve the situation:

    The following packages have unmet dependencies:
     wine : Depends: wine1.6 but it is not going to be installed or
                     wine1.8 but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    user@box:~/Downloads$ dpkg -l|grep wine
    ii  libkwineffects1abi4                                         4:4.11.11-0ubuntu0.2                                amd64        library used by effects for the KDE window manager
    rc  wine1.6                                                     1:1.6.2-0ubuntu4                                    amd64        Microsoft Windows Compatibility Layer (Binary Emulator and Library)
    rc  wine1.6-amd64                                               1:1.6.2-0ubuntu4                                    amd64        Microsoft Windows Compatibility Layer (64-bit support)
    rc  wine1.6-i386                                                1:1.6.2-0ubuntu4                                    i386         Microsoft Windows Compatibility Layer (32-bit support)
    user@box:~/Downloads$ sudo apt-get reinstall wine1.6
    E: Invalid operation reinstall
    user@box:~/Downloads$ sudo apt-get --reinstall install wine1.6
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help resolve the situation:

    The following packages have unmet dependencies:
     wine1.6 : Depends: wine1.6-amd64 (= 1:1.6.2-0ubuntu4)
               Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu4)
    E: Unable to correct problems, you have held broken packages.
    user@box:~/Downloads$ sudo apt-get remove wine1.6

    user@box:~/Downloads$ sudo apt-get remove wine1.6
    [sudo] password for one:
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Package 'wine1.6' is not installed, so not removed
    The following packages were automatically installed and are no longer required:
      libasn1-8-heimdal:i386 libgssapi3-heimdal:i386 libhcrypto4-heimdal:i386
      libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386 libhx509-5-heimdal:i386
      libkrb5-26-heimdal:i386 libkutils4 liblcms2-2:i386 libldap-2.4-2:i386
      libroken18-heimdal:i386 libsasl2-2:i386 libsasl2-modules-db:i386
      libwind0-heimdal:i386
    Use 'apt-get autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
    user@box:~/Downloads$ sudo apt-get remove wine
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Package 'wine' is not installed, so not removed
    The following packages were automatically installed and are no longer required:
      libasn1-8-heimdal:i386 libgssapi3-heimdal:i386 libhcrypto4-heimdal:i386
      libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386 libhx509-5-heimdal:i386
      libkrb5-26-heimdal:i386 libkutils4 liblcms2-2:i386 libldap-2.4-2:i386
      libroken18-heimdal:i386 libsasl2-2:i386 libsasl2-modules-db:i386
      libwind0-heimdal:i386
    Use 'apt-get autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
    user@box:~/Downloads$ sudo apt-get install wine
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help resolve the situation:

    The following packages have unmet dependencies:
     wine : Depends: wine1.6 but it is not going to be installed or
                     wine1.8 but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    user@box:~/Downloads$ sudo apt-get install wine1.8
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help resolve the situation:

    The following packages have unmet dependencies:
     wine1.8 : Depends: wine1.8-amd64 (= 1:1.8.0-0ubuntu1) but it is not going to be installed
               Depends: wine1.8-i386 (= 1:1.8.0-0ubuntu1)
    E: Unable to correct problems, you have held broken packages.
    user@box:~/Downloads$ sudo apt-get install wine1.8-amd64
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help resolve the situation:

    The following packages have unmet dependencies:
     wine1.8-amd64 : Depends: libopencl-1.1-1
                     Depends: wine1.8:any (= 1:1.8.0-0ubuntu1)
    E: Unable to correct problems, you have held broken packages.
    user@box:~/Downloads$ cd ~^C
     


  • ffmpeg trouble concatenating similar but different files


    When things go wrong your video is basically unplayable or the first video plays fine and then freezes when moving on to the next.  Generally if both videos weren't produced with the exact 100% same settings you will have issues.  You can try the basic concat but it often won't work right.

    Solution for me:

    My example uses 3 videos in total so "n=3"  and a=1 to include audio.

    ffmpeg -threads 12  -i file1.mp4 -i file2.mp4 -i file3.mp4 -filter_complex concat=n=3:v=1:a=1 $outputfile-final.mp4

    =======

    ffmpeg -i $intro -i $outputfile -i $outtro
    -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] [2:v:0] [2:a:0] concat=n=3:v=1:a=1 [v] [a]"
    -map "[v]" -map "[a]" $outputfile-branded-final.mp4

    ffmpeg -i $intro -i uservideoRendered.mp4-branded.mp4 -i $outtro
    > -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] [2:v:0] [2:a:0] concat=n=3:v=1:a=1 [v] [a]"
    > -map "[v]" -map "[a]" $outputfile-branded-final.mp4^C

    fmpeg -safe 0 -f concat -i files.txt -c copy video_draft.avi
    ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers
      built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
      configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc
      libavutil      55. 58.100 / 55. 58.100
      libavcodec     57. 89.100 / 57. 89.100
      libavformat    57. 71.100 / 57. 71.100
      libavdevice    57.  6.100 / 57.  6.100
      libavfilter     6. 82.100 /  6. 82.100
      libavresample   3.  5.  0 /  3.  5.  0
      libswscale      4.  6.100 /  4.  6.100
      libswresample   2.  7.100 /  2.  7.100
      libpostproc    54.  5.100 / 54.  5.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x3f22100] Auto-inserting h264_mp4toannexb bitstream filter
    Input #0, concat, from 'files.txt':
      Duration: N/A, start: 0.000000, bitrate: 2284 kb/s
        Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 1967 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc
        Metadata:
          creation_time   : 2017-06-30T22:34:32.000000Z
          handler_name    : Alias Data Handler
          encoder         : AVC Coding
        Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s
        Metadata:
          creation_time   : 2017-06-30T22:34:32.000000Z
          handler_name    : Alias Data Handler
    Output #0, avi, to 'video_draft.avi':
      Metadata:
        ISFT            : Lavf57.71.100
        Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, q=2-31, 1967 kb/s, 30 fps, 30 tbr, 60 tbn, 60 tbc
        Metadata:
          creation_time   : 2017-06-30T22:34:32.000000Z
          handler_name    : Alias Data Handler
          encoder         : AVC Coding
        Stream #0:1(eng): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 317 kb/s
        Metadata:
          creation_time   : 2017-06-30T22:34:32.000000Z
          handler_name    : Alias Data Handler
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x3fe3be0] Auto-inserting h264_mp4toannexb bitstream filter
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x3fe3be0] Auto-inserting h264_mp4toannexb bitstream filtered=61.6x   
    frame=16287 fps=1824 q=-1.0 Lsize=  385206kB time=00:09:03.50 bitrate=5806.0kbits/s speed=60.9x   
    video:372728kB audio:11086kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.362498%


    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2af7da0] Found duplicated MOOV Atom. Skipped it

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x33639c0] Auto-inserting h264_mp4toannexb bitstream filter
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x33639c0] Auto-inserting h264_mp4toannexb bitstream filtered= 153x   
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107362, current: 6437563; changing to 16107363. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107363, current: 6437963; changing to 16107364. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107364, current: 6438363; changing to 16107365. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107365, current: 6438763; changing to 16107366. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107366, current: 6439163; changing to 16107367. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107367, current: 6439563; changing to 16107368. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107368, current: 6439963; changing to 16107369. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107369, current: 6440363; changing to 16107370. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107370, current: 6440763; changing to 16107371. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107371, current: 6441163; changing to 16107372. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107372, current: 6441563; changing to 16107373. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107373, current: 6441963; changing to 16107374. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107374, current: 6442363; changing to 16107375. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107375, current: 6442763; changing to 16107376. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107376, current: 6443163; changing to 16107377. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107377, current: 6443563; changing to 16107378. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107378, current: 6443963; changing to 16107379. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107379, current: 6444363; changing to 16107380. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107380, current: 6444763; changing to 16107381. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107381, current: 6445163; changing to 16107382. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107382, current: 6445563; changing to 16107383. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107383, current: 6445963; changing to 16107384. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107384, current: 6446363; changing to 16107385. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107385, current: 6446763; changing to 16107386. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107386, current: 6447163; changing to 16107387. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107387, current: 6447563; changing to 16107388. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107388, current: 6447963; changing to 16107389. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107389, current: 6448363; changing to 16107390. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107390, current: 6448763; changing to 16107391. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107391, current: 6449163; changing to 16107392. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107392, current: 6449563; changing to 16107393. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107393, current: 6449963; changing to 16107394. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107394, current: 6450363; changing to 16107395. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107395, current: 6450763; changing to 16107396. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107396, current: 6451163; changing to 16107397. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107397, current: 6451563; changing to 16107398. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107398, current: 6451963; changing to 16107399. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107399, current: 6452363; changing to 16107400. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107400, current: 6452763; changing to 16107401. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107401, current: 6453163; changing to 16107402. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107402, current: 6453563; changing to 16107403. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107403, current: 6453963; changing to 16107404. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107404, current: 6454363; changing to 16107405. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107405, current: 6454763; changing to 16107406. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107406, current: 6455163; changing to 16107407. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107407, current: 6455563; changing to 16107408. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107408, current: 6455963; changing to 16107409. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107409, current: 6456363; changing to 16107410. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107410, current: 6456763; changing to 16107411. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107411, current: 6457163; changing to 16107412. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107412, current: 6457563; changing to 16107413. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107413, current: 6457963; changing to 16107414. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107414, current: 6458363; changing to 16107415. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107415, current: 6458763; changing to 16107416. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107416, current: 6459163; changing to 16107417. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107417, current: 6459563; changing to 16107418. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107418, current: 6459963; changing to 16107419. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107419, current: 6460363; changing to 16107420. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107420, current: 6460763; changing to 16107421. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107421, current: 6461163; changing to 16107422. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107422, current: 6461563; changing to 16107423. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107423, current: 6461963; changing to 16107424. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107424, current: 6462363; changing to 16107425. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107425, current: 6462763; changing to 16107426. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107426, current: 6463163; changing to 16107427. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107427, current: 6463563; changing to 16107428. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107428, current: 6463963; changing to 16107429. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107429, current: 6464363; changing to 16107430. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107430, current: 6464763; changing to 16107431. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107431, current: 6465163; changing to 16107432. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107432, current: 6465563; changing to 16107433. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107433, current: 6465963; changing to 16107434. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107434, current: 6466363; changing to 16107435. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107435, current: 6466763; changing to 16107436. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107436, current: 6467163; changing to 16107437. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107437, current: 6467563; changing to 16107438. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107438, current: 6467963; changing to 16107439. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107439, current: 6468363; changing to 16107440. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107440, current: 6468763; changing to 16107441. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107441, current: 6469163; changing to 16107442. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107442, current: 6469563; changing to 16107443. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107443, current: 6469963; changing to 16107444. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107444, current: 6470363; changing to 16107445. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107445, current: 6470763; changing to 16107446. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107446, current: 6471163; changing to 16107447. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107447, current: 6471563; changing to 16107448. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107448, current: 6471963; changing to 16107449. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107449, current: 6472363; changing to 16107450. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107450, current: 6472763; changing to 16107451. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107451, current: 6473163; changing to 16107452. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107452, current: 6473563; changing to 16107453. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107453, current: 6473963; changing to 16107454. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107454, current: 6474363; changing to 16107455. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107455, current: 6474763; changing to 16107456. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107456, current: 6475163; changing to 16107457. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107457, current: 6475563; changing to 16107458. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107458, current: 6475963; changing to 16107459. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107459, current: 6476363; changing to 16107460. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107460, current: 6476763; changing to 16107461. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107461, current: 6477163; changing to 16107462. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107462, current: 6477563; changing to 16107463. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107463, current: 6477963; changing to 16107464. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107464, current: 6478363; changing to 16107465. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107465, current: 6478763; changing to 16107466. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107466, current: 6479163; changing to 16107467. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107467, current: 6479563; changing to 16107468. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107468, current: 6479963; changing to 16107469. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107469, current: 6480363; changing to 16107470. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107470, current: 6480763; changing to 16107471. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107471, current: 6481163; changing to 16107472. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107472, current: 6481563; changing to 16107473. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107473, current: 6481963; changing to 16107474. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107474, current: 6482363; changing to 16107475. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107475, current: 6482763; changing to 16107476. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107476, current: 6483163; changing to 16107477. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107477, current: 6483563; changing to 16107478. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107478, current: 6483963; changing to 16107479. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107479, current: 6484363; changing to 16107480. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107480, current: 6484763; changing to 16107481. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107481, current: 6485163; changing to 16107482. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107482, current: 6485563; changing to 16107483. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107483, current: 6485963; changing to 16107484. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107484, current: 6486363; changing to 16107485. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107485, current: 6486763; changing to 16107486. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107486, current: 6487163; changing to 16107487. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107487, current: 6487563; changing to 16107488. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107488, current: 6487963; changing to 16107489. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107489, current: 6488363; changing to 16107490. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107490, current: 6488763; changing to 16107491. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107491, current: 6489163; changing to 16107492. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107492, current: 6489563; changing to 16107493. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107493, current: 6489963; changing to 16107494. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107494, current: 6490363; changing to 16107495. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107495, current: 6490763; changing to 16107496. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107496, current: 6491163; changing to 16107497. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107497, current: 6491563; changing to 16107498. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107498, current: 6491963; changing to 16107499. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107499, current: 6492363; changing to 16107500. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107500, current: 6492763; changing to 16107501. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107501, current: 6493163; changing to 16107502. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107502, current: 6493563; changing to 16107503. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107503, current: 6493963; changing to 16107504. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107504, current: 6494363; changing to 16107505. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107505, current: 6494763; changing to 16107506. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107506, current: 6495163; changing to 16107507. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107507, current: 6495563; changing to 16107508. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107508, current: 6495963; changing to 16107509. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107509, current: 6496363; changing to 16107510. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107510, current: 6496763; changing to 16107511. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107511, current: 6497163; changing to 16107512. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107512, current: 6497563; changing to 16107513. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107513, current: 6497963; changing to 16107514. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107514, current: 6498363; changing to 16107515. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107515, current: 6498763; changing to 16107516. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107516, current: 6499163; changing to 16107517. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107517, current: 6499563; changing to 16107518. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107518, current: 6499963; changing to 16107519. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107519, current: 6500363; changing to 16107520. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107520, current: 6500763; changing to 16107521. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107521, current: 6501163; changing to 16107522. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107522, current: 6501563; changing to 16107523. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107523, current: 6501963; changing to 16107524. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107524, current: 6502363; changing to 16107525. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107525, current: 6502763; changing to 16107526. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107526, current: 6503163; changing to 16107527. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107527, current: 6503563; changing to 16107528. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107528, current: 6503963; changing to 16107529. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107529, current: 6504363; changing to 16107530. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107530, current: 6504763; changing to 16107531. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107531, current: 6505163; changing to 16107532. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107532, current: 6505563; changing to 16107533. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107533, current: 6505963; changing to 16107534. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107534, current: 6506363; changing to 16107535. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107535, current: 6506763; changing to 16107536. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107536, current: 6507163; changing to 16107537. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107537, current: 6507563; changing to 16107538. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107538, current: 6507963; changing to 16107539. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107539, current: 6508363; changing to 16107540. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107540, current: 6508763; changing to 16107541. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107541, current: 6509163; changing to 16107542. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107542, current: 6509563; changing to 16107543. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107543, current: 6509963; changing to 16107544. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107544, current: 6510363; changing to 16107545. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107545, current: 6510763; changing to 16107546. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107546, current: 6511163; changing to 16107547. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107547, current: 6511563; changing to 16107548. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107548, current: 6511963; changing to 16107549. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107549, current: 6512363; changing to 16107550. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107550, current: 6512763; changing to 16107551. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107551, current: 6513163; changing to 16107552. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107552, current: 6513563; changing to 16107553. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107553, current: 6513963; changing to 16107554. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107554, current: 6514363; changing to 16107555. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x32c4ca0] Non-monotonous DTS in output stream 0:0; previous: 16107555, current: 6514763; changing to 16107556. This may result in incorrect timestamps in the output file.
    frame=16287 fps=1824 q=-1.0 Lsize=  381293kB time=00:22:23.64 bitrate=2324.7kbits/s speed= 150x   
    video:369967kB audio:10784kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.142437%

    This makes the video about 22 minutes even though it should be about 9!
    This is because the main video is CBR audio and the other ones being joined at variable.  To fix they must be constant CBR of 163kbps to match

    maybe it's also framerate mode one of them is variable and needs to be constant for the video.
    use the -crf flag instead of -r

    Frame rate mode                          : Variable


    Change FPS to 29.97 or change the "-r 29.97" to whatever frame rate you want
    ffmpeg -i 02.mp4 -r 29.97 02-30fps.mp4

    #changes to 29.97 fps and sets aac audio to 163kbit constant
    ffmpeg -i 02.mp4 -vcodec copy -acodec libfdk_aac -ab 163k -r 29.97 02-30fps.mp4



    ffmpeg -i 02.mp4 -vcodec copy  -acodec libfdk_aac -ab 163k -crf 29.97 02-30fps.mp4

    ffmpeg -i 02.mp4 -vcodec copy  -acodec libfdk_aac -ab 163k -crf 29.97 -r 29.97 02-30fps.mp4

    ffmpeg -i 02.mp4 -vcodec h264  -acodec libfdk_aac -ab 163k -vf "fps=29.97" 02-30fps.mp4


    ffmpeg -i initial.mp4 -i initial.mp4 -i initial.mp4 -i ending.mp4 -filter_complex concat=n=4:v=1:a=0 -f MOV output.mp4 -y

    ffmpeg -threads 12  -i 02.mp4 -i uservideoRendered.mp4 -i 02.mp4 -filter_complex concat=n=3:v=1:a=0 -acodec copy -f h264 output.mp4 -y
    #above works but video is unplayable and time is all wrong and no audio

    change concat=n=3:v=1:a=0 to concat=n=3:v=1:a=1

    ffmpeg -threads 12  -i 02.mp4 -i uservideoRendered.mp4 -i 02.mp4 -filter_complex concat=n=3:v=1:a=1 output.mp4


  • ffmpeg Unable to Use Hardware Encoding with Nvidia 3.40 Driver and GT210 card


    I believe from what I've read that this card's driver doesn't support the features after trying all known troubleshooting methods.

    ffmpeg -i uservideoRendered.mp4 -filter:v hwupload_cuda,scale_npp=w=1920:h=1080:format=nv12:interp_algo=lanczos,hwdownload -c:v hevc_nvenc -profile main -preset slow -rc vbr_hq -c:a copy uservideoRendered.mp4-test

    ffmpeg -i uservideoRendered.mp4 -filter:v hwupload_cuda,scale_npp=w=1920:h=1080:format=nv12:interp_algo=lanczos,hwdownload -c:v hevc_nvenc -profile:v main -preset fast -rc vbr_hq -c:a copy uservideoRendered-test.mp4

    Could not initialize the CUDA driver API
    [AVFilterGraph @ 0x39d9500] Error initializing filter 'hwupload_cuda'
    Error reinitializing filters!
    Failed to inject frame into filter network: Unknown error occurred
    Error while processing the decoded data for stream #0:0

    sudo apt-get install nvidia-cuda-toolkit

    ffmpeg -i uservideoRendered.mp4 -filter:v hwupload_cuda,scale_npp=w=1920:h=1080:format=nv12:interp_algo=lanczos,hwdownload -c:v hevc_nvenc -profile main -preset fast -rc vbr_hq -c:a copy uservideoRendered-test.mp4
    [AVFilterGraph @ 0x31465e0] No such filter: 'scale_npp'
    Error reinitializing filters!
    Failed to inject frame into filter network: Invalid argument
    Error while processing the decoded data for stream #0:0
    Conversion failed!


    ffmpeg -i uservideoRendered.mp4 -filter:v hwupload_cuda,scale_npp=w=1316:h=1080:format=yuv420p:interp_algo=lanczos,hwdownload,format=yuv420p -c:v hevc_nvenc -profile main -preset fast -rc vbr_hq -c:a copy uservideoRendered-test.mp4
    [AVFilterGraph @ 0x32d7860] No such filter: 'scale_npp'
    Error reinitializing filters!
    Failed to inject frame into filter network: Invalid argument
    Error while processing the decoded data for stream #0:0


    /home/one/ffmpeg-3.3.2/ffmpeg -i uservideoRendered.mp4 -filter:v hwupload_cuda,scale_npp=w=1316:h=1080:format=yuv420p:interp_algo=lanczos,hwdownload,format=yuv420p -c:v hevc_nvenc -profile main -preset fast -rc vbr_hq -c:a copy uservideoRendered-test.mp4

    =========

    ffmpeg -i uservideoRendered.mp4 -i "/pathlogo-creation/2017-good-final/ORDER150f1.png" -filter_complex overlay=x=w-tw-10:y=h-th-10 uservideoRendered.mp4-branded.mp4

    [nvenc_hevc @ 0x2659760] This encoder is deprecated, use 'hevc_nvenc' instead
    Cannot load NvEncodeAPIGetMaxSupportedVersion
    Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    ffmpeg -i uservideoRendered.mp4 -i "/pathlogo-creation/2017-good-final/ORDER150f1.png" -filter_complex overlay=x=w-tw-10:y=h-th-10 uservideoRendered.mp4-branded.mp4

    Cannot load NvEncodeAPIGetMaxSupportedVersion
    Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height


    ffmpeg -i $sourcevideo -i "$watermarkfile" -c copy  -c:v h264_nvenc -profile high444p -pixel_format yuv444p -preset default -filter_complex overlay=W-w-25:H-h-25 $outputfile

    Please use -profile:a or -profile:v, -profile is ambiguous



    ffmpeg -i $sourcevideo -i "$watermarkfile" -c copy  -c:v hevc_nvenc -profile:a main -preset slow -filter_complex overlay=W-w-25:H-h-25 $outputfile
    [NULL @ 0x31b5a60] [Eval @ 0x7ffd44eff2d0] Undefined constant or missing '(' in 'main'
    [NULL @ 0x31b5a60] Unable to parse option value "main"
    [NULL @ 0x31b5a60] Error setting option profile to value main.
    Error setting up codec context options.

    ffmpeg -i $sourcevideo -i "$watermarkfile" -c copy -c:v hevc_nvenc -profile:v main10 -preset slow -filter_complex overlay=W-w-25:H-h-25 $outputfile
    Cannot load NvEncodeAPIGetMaxSupportedVersion
    Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height


  • Linux Mint USB Kernel Tainted and Locked Port/Dev File


    Essentially a program I was running for mining did not terminate properly with Ctrl+C it is listed as defunct and cannot be killed, kernel is tainted and normal tricks to disable the port are impossible the dev and sys entries for the device cannot be browsed or interacted with in any form without a lockup of the request.  The only solution is to reboot due to the kernel taint as far as I can find so far.

     

    [1130246.811056] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1130246.811066]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1130246.811068] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1130246.811072] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1130246.811079]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1130246.811082]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1130246.811085]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1130246.811089] Call Trace:
    [1130246.811103]  [<ffffffff81804585>] schedule+0x35/0x80
    [1130246.811108]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1130246.811116]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1130246.811126]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1130246.811132]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1130246.811136]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1130246.811140]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1130246.811143]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1130246.811149]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1130246.811152]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1130246.811158]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1130246.811163]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1130246.811166]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1130246.811169]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1130246.811174]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1130246.811178]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1130246.811181]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1130246.811184]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1130246.811187]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1130246.811191]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1130246.811196]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1130246.811199]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f
    [1130366.807538] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1130366.807550]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1130366.807553] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1130366.807557] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1130366.807566]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1130366.807570]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1130366.807574]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1130366.807578] Call Trace:
    [1130366.807594]  [<ffffffff81804585>] schedule+0x35/0x80
    [1130366.807601]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1130366.807609]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1130366.807621]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1130366.807628]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1130366.807632]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1130366.807637]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1130366.807641]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1130366.807648]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1130366.807652]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1130366.807658]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1130366.807664]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1130366.807668]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1130366.807672]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1130366.807678]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1130366.807682]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1130366.807686]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1130366.807689]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1130366.807694]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1130366.807698]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1130366.807704]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1130366.807708]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f
    [1130486.803970] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1130486.803981]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1130486.803983] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1130486.803986] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1130486.803994]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1130486.803998]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1130486.804001]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1130486.804004] Call Trace:
    [1130486.804017]  [<ffffffff81804585>] schedule+0x35/0x80
    [1130486.804023]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1130486.804031]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1130486.804041]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1130486.804047]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1130486.804051]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1130486.804054]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1130486.804058]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1130486.804064]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1130486.804067]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1130486.804072]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1130486.804077]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1130486.804080]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1130486.804083]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1130486.804088]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1130486.804092]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1130486.804095]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1130486.804097]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1130486.804101]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1130486.804105]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1130486.804110]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1130486.804113]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f
    [1130606.800437] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1130606.800447]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1130606.800449] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1130606.800453] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1130606.800460]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1130606.800464]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1130606.800467]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1130606.800470] Call Trace:
    [1130606.800483]  [<ffffffff81804585>] schedule+0x35/0x80
    [1130606.800489]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1130606.800497]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1130606.800506]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1130606.800512]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1130606.800516]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1130606.800520]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1130606.800523]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1130606.800529]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1130606.800532]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1130606.800538]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1130606.800543]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1130606.800546]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1130606.800549]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1130606.800554]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1130606.800557]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1130606.800561]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1130606.800563]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1130606.800567]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1130606.800571]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1130606.800575]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1130606.800579]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f
    [1130726.797019] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1130726.797035]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1130726.797040] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1130726.797046] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1130726.797060]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1130726.797068]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1130726.797074]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1130726.797082] Call Trace:
    [1130726.797101]  [<ffffffff81804585>] schedule+0x35/0x80
    [1130726.797111]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1130726.797124]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1130726.797142]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1130726.797151]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1130726.797158]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1130726.797167]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1130726.797174]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1130726.797184]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1130726.797191]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1130726.797201]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1130726.797210]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1130726.797216]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1130726.797223]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1130726.797233]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1130726.797240]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1130726.797247]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1130726.797253]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1130726.797260]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1130726.797267]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1130726.797275]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1130726.797282]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f
    [1130846.793476] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1130846.793494]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1130846.793498] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1130846.793504] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1130846.793517]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1130846.793525]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1130846.793531]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1130846.793538] Call Trace:
    [1130846.793559]  [<ffffffff81804585>] schedule+0x35/0x80
    [1130846.793569]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1130846.793587]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1130846.793604]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1130846.793615]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1130846.793622]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1130846.793631]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1130846.793637]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1130846.793647]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1130846.793654]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1130846.793663]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1130846.793672]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1130846.793679]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1130846.793685]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1130846.793695]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1130846.793702]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1130846.793708]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1130846.793714]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1130846.793721]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1130846.793728]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1130846.793736]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1130846.793743]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f
    [1130966.789951] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1130966.789967]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1130966.789972] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1130966.789978] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1130966.789991]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1130966.789999]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1130966.790006]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1130966.790012] Call Trace:
    [1130966.790032]  [<ffffffff81804585>] schedule+0x35/0x80
    [1130966.790042]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1130966.790054]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1130966.790071]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1130966.790082]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1130966.790089]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1130966.790098]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1130966.790104]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1130966.790114]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1130966.790121]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1130966.790130]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1130966.790139]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1130966.790146]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1130966.790152]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1130966.790161]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1130966.790168]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1130966.790175]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1130966.790180]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1130966.790187]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1130966.790194]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1130966.790202]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1130966.790209]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f
    [1131086.786307] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1131086.786318]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1131086.786320] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1131086.786323] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1131086.786330]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1131086.786334]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1131086.786337]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1131086.786341] Call Trace:
    [1131086.786354]  [<ffffffff81804585>] schedule+0x35/0x80
    [1131086.786359]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1131086.786367]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1131086.786377]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1131086.786383]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1131086.786386]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1131086.786390]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1131086.786393]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1131086.786399]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1131086.786402]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1131086.786408]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1131086.786413]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1131086.786416]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1131086.786418]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1131086.786424]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1131086.786427]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1131086.786430]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1131086.786436]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1131086.786439]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1131086.786443]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1131086.786448]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1131086.786452]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f
    [1131206.782895] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1131206.782912]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1131206.782917] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1131206.782923] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1131206.782936]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1131206.782943]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1131206.782950]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1131206.782957] Call Trace:
    [1131206.782977]  [<ffffffff81804585>] schedule+0x35/0x80
    [1131206.782987]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1131206.782999]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1131206.783017]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1131206.783027]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1131206.783034]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1131206.783043]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1131206.783050]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1131206.783060]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1131206.783067]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1131206.783076]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1131206.783085]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1131206.783092]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1131206.783098]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1131206.783110]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1131206.783117]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1131206.783124]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1131206.783130]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1131206.783137]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1131206.783144]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1131206.783157]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1131206.783164]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f
    [1131326.779349] INFO: task minerd:21861 blocked for more than 120 seconds.
    [1131326.779366]       Tainted: P           OE   4.4.0-64-generic #85~14.04.1-Ubuntu
    [1131326.779371] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [1131326.779376] minerd          D ffff88051fc23b68     0 21861  21854 0x00000006
    [1131326.779389]  ffff88051fc23b68 ffff8805657cb300 ffff880fecf53fc0 ffff88051fc24000
    [1131326.779397]  ffff880803265438 ffff880803265018 ffff88080c629520 ffff8807eba53500
    [1131326.779404]  ffff88051fc23b80 ffffffff81804585 ffff880c3556e240 ffff88051fc23bc0
    [1131326.779410] Call Trace:
    [1131326.779430]  [<ffffffff81804585>] schedule+0x35/0x80
    [1131326.779440]  [<ffffffff815f8214>] usb_kill_urb+0x64/0xa0
    [1131326.779453]  [<ffffffff810bf500>] ? prepare_to_wait_event+0xf0/0xf0
    [1131326.779469]  [<ffffffffc10faf06>] acm_port_shutdown+0xd6/0x110 [cdc_acm]
    [1131326.779479]  [<ffffffff814d8f4a>] tty_port_shutdown+0x6a/0xa0
    [1131326.779486]  [<ffffffff814d9746>] tty_port_close+0x26/0x50
    [1131326.779495]  [<ffffffffc10f8d44>] acm_tty_close+0x34/0x70 [cdc_acm]
    [1131326.779501]  [<ffffffff814cffc5>] tty_release+0x105/0x570
    [1131326.779511]  [<ffffffff81202994>] __fput+0xe4/0x210
    [1131326.779518]  [<ffffffff81202afe>] ____fput+0xe/0x10
    [1131326.779528]  [<ffffffff8109b336>] task_work_run+0x86/0xb0
    [1131326.779537]  [<ffffffff8108d875>] get_signal+0x5e5/0x610
    [1131326.779543]  [<ffffffff814d3ff5>] ? n_tty_read+0x325/0xa70
    [1131326.779550]  [<ffffffff81803f29>] ? __schedule+0x359/0x980
    [1131326.779559]  [<ffffffff8102d4a8>] do_signal+0x28/0x6c0
    [1131326.779566]  [<ffffffff810bf370>] ? __wake_up_sync+0x20/0x20
    [1131326.779573]  [<ffffffff814d7636>] ? tty_ldisc_deref+0x16/0x20
    [1131326.779578]  [<ffffffff814cfb2c>] ? tty_read+0x9c/0xf0
    [1131326.779585]  [<ffffffff81200708>] ? __vfs_read+0x18/0x40
    [1131326.779592]  [<ffffffff8107981c>] exit_to_usermode_loop+0x59/0xa2
    [1131326.779600]  [<ffffffff81003a6e>] syscall_return_slowpath+0x4e/0x60
    [1131326.779607]  [<ffffffff81807f58>] int_ret_from_sys_call+0x25/0x8f

    ps aux|grep minerd
    root     21855  0.0  0.0      0     0 ?        Zl   13:03   0:00 [minerd] <defunct>
    root     22322  0.0  0.0 103840  5920 ?        D    13:28   0:00 /home/one/MyFiles/Bank/mining/cpuminer-gridseed-syklon-support/cpuminer-gc3355-master/minerd --gc3355-detect -o stratum+tcp://stratum.aikapool.com:7919 -u coinguy.zworker -p qbumr4YoPk25dYRxja2y
    root     24899  0.0  0.0  11764  2076 pts/4    S+   16:17   0:00 grep --colour=auto minerd
    box user # kill -kill 21855
    box user # ps aux|grep minerd
    root     21855  0.0  0.0      0     0 ?        Zl   13:03   0:00 [minerd] <defunct>
    root     22322  0.0  0.0 103840  5920 ?        D    13:28   0:00 /home/one/MyFiles/Bank/mining/cpuminer-gridseed-syklon-support/cpuminer-gc3355-master/minerd --gc3355-detect -o stratum+tcp://stratum.aikapool.com:7919 -u coinguy.zworker -p qbumr4YoPk25dYRxja2y
    root     24901  0.0  0.0  11764  2248 pts/4    S+   16:17   0:00 grep --colour=auto minerd


    [1131435.736796] usb 2-4: USB disconnect, device number 17
    [1131437.743307] usb 2-1: USB disconnect, device number 15

    cd /sys/bus/usb/devices
     ls
    1-0:1.0  2-10      2-9      3-0:1.0  3-1:1.0    4-1      4-1.1:1.0  usb3
    2-0:1.0  2-10:1.0  2-9:1.0  3-1      3-1.1:1.0  4-1.1    usb1       usb4
    2-1      2-1:1.1   2-9:1.1  3-1.1    4-0:1.0    4-1:1.0  usb2

    lsusb and even manual reset hang:

    lsusb


    ^C^C^C^C

    echo 0 > 2-1/authorized


    cat /dev/bus/usb/002/001
    ^C^C

    ^C^C^C^C^C^C^C^C^C^C^C^C^C


     


  • ffmpeg Linux Mint download, compile and install howto


    #if you have nvidia make sure you install the nvidia-cuda-toolkit so hardware acceleration can be used

    wget http://ffmpeg.org/releases/ffmpeg-3.3.2.tar.bz2
    tar -jxvf ffmpeg-3.3.2.tar.bz2
    cd  ffmpeg-3.3.2/


    ./configure --disable-yasm

    install prefix            /usr/local
    source path               .
    C compiler                gcc
    C library                 glibc
    ARCH                      x86 (generic)
    big-endian                no
    runtime cpu detection     yes
    yasm                      no
    MMX enabled               yes
    MMXEXT enabled            yes
    3DNow! enabled            yes
    3DNow! extended enabled   yes
    SSE enabled               yes
    SSSE3 enabled             yes
    AESNI enabled             yes
    AVX enabled               yes
    XOP enabled               yes
    FMA3 enabled              yes
    FMA4 enabled              yes
    i686 features enabled     yes
    CMOV is fast              yes
    EBX available             yes
    EBP available             yes
    debug symbols             yes
    strip symbols             yes
    optimize for size         no
    optimizations             yes
    static                    yes
    shared                    no
    postprocessing support    no
    network support           yes
    threading support         pthreads
    safe bitstream reader     yes
    texi2html enabled         no
    perl enabled              yes
    pod2man enabled           yes
    makeinfo enabled          no
    makeinfo supports HTML    no

    External libraries:
    iconv              libxcb            libxcb_shm              xlib            zlib

    External libraries providing hardware acceleration:
    cuda              cuvid                nvenc

    Libraries:
    avcodec              avdevice            avfilter              avformat            avutil              swresample            swscale

    Programs:
    ffmpeg              ffprobe            ffserver

    Enabled decoders:
    aac              aic                cook              fmvc            mdec              opus                ppm                  srt            vp3
    aac_fixed          alac                cpia              fourxm            metasound          paf_audio            prores              ssa            vp5
    aac_latm          alias_pix            cscd              fraps            microdvd          paf_video            prores_lgpl              stl            vp6
    aasc              als                cyuv              frwu            mimic              pam                psd                  subrip            vp6a
    ac3              amrnb                dca                  g2m            mjpeg              pbm                ptx                  subviewer            vp6f
    ac3_fixed          amrwb                dds                  g723_1            mjpeg_cuvid          pcm_alaw            qcelp              subviewer1        vp7
    adpcm_4xm          amv                dfa                  g729            mjpegb              pcm_bluray            qdm2              sunrast            vp8
    adpcm_adx          anm                dirac              gif            mlp              pcm_dvd            qdmc              svq1            vp8_cuvid
    adpcm_afc          ansi                dnxhd              gsm            mmvideo              pcm_f16le            qdraw              svq3            vp9
    adpcm_aica          ape                dpx                  gsm_ms            motionpixels          pcm_f24le            qpeg              tak            vp9_cuvid
    adpcm_ct          apng                dsd_lsbf              h261            movtext              pcm_f32be            qtrle              targa            vplayer
    adpcm_dtk          ass                dsd_lsbf_planar          h263            mp1              pcm_f32le            r10k              targa_y216        vqa
    adpcm_ea          asv1                dsd_msbf              h263i            mp1float          pcm_f64be            r210              tdsc            wavpack
    adpcm_ea_maxis_xa      asv2                dsd_msbf_planar          h263p            mp2              pcm_f64le            ra_144              text            webp
    adpcm_ea_r1          atrac1            dsicinaudio              h264            mp2float          pcm_lxf            ra_288              theora            webvtt
    adpcm_ea_r2          atrac3            dsicinvideo              h264_cuvid        mp3              pcm_mulaw            ralf              thp            wmalossless
    adpcm_ea_r3          atrac3al            dss_sp              hap            mp3adu              pcm_s16be            rawvideo              tiertexseqvideo        wmapro
    adpcm_ea_xas          atrac3p            dst                  hevc            mp3adufloat          pcm_s16be_planar        realtext              tiff            wmav1
    adpcm_g722          atrac3pal            dvaudio              hevc_cuvid        mp3float          pcm_s16le            rl2                  tmv            wmav2
    adpcm_g726          aura                dvbsub              hnm4_video        mp3on4              pcm_s16le_planar        roq                  truehd            wmavoice
    adpcm_g726le          aura2                dvdsub              hq_hqa            mp3on4float          pcm_s24be            roq_dpcm              truemotion1        wmv1
    adpcm_ima_amv          avrn                dvvideo              hqx            mpc7              pcm_s24daud            rpza              truemotion2        wmv2
    adpcm_ima_apc          avrp                dxa                  huffyuv            mpc8              pcm_s24le            rscc              truemotion2rt        wmv3
    adpcm_ima_dat4          avs                dxtory              iac            mpeg1_cuvid          pcm_s24le_planar        rv10              truespeech        wmv3image
    adpcm_ima_dk3          avui                dxv                  idcin            mpeg1video          pcm_s32be            rv20              tscc            wnv1
    adpcm_ima_dk4          ayuv                eac3              idf            mpeg2_cuvid          pcm_s32le            rv30              tscc2            ws_snd1
    adpcm_ima_ea_eacs      bethsoftvid            eacmv              iff_ilbm            mpeg2video          pcm_s32le_planar        rv40              tta            xan_dpcm
    adpcm_ima_ea_sead      bfi                eamad              imc            mpeg4              pcm_s64be            s302m              twinvq            xan_wc3
    adpcm_ima_iss          bink                eatgq              indeo2            mpeg4_cuvid          pcm_s64le            sami              txd            xan_wc4
    adpcm_ima_oki          binkaudio_dct            eatgv              indeo3            mpegvideo          pcm_s8            sanm              ulti            xbin
    adpcm_ima_qt          binkaudio_rdft        eatqi              indeo4            mpl2              pcm_s8_planar            scpr              utvideo            xbm
    adpcm_ima_rad          bintext            eightbps              indeo5            msa1              pcm_u16be            screenpresso          v210            xface
    adpcm_ima_smjpeg      bmp                eightsvx_exp          interplay_acm        msmpeg4v1          pcm_u16le            sdx2_dpcm              v210x            xl
    adpcm_ima_wav          bmv_audio            eightsvx_fib          interplay_dpcm        msmpeg4v2          pcm_u24be            sgi                  v308            xma1
    adpcm_ima_ws          bmv_video            escape124              interplay_video        msmpeg4v3          pcm_u24le            sgirle              v408            xma2
    adpcm_ms          brender_pix            escape130              jacosub            msrle              pcm_u32be            sheervideo              v410            xpm
    adpcm_mtaf          c93                evrc              jpeg2000            mss1              pcm_u32le            shorten              vb            xsub
    adpcm_psx          cavs                exr                  jpegls            mss2              pcm_u8            sipr              vble            xwd
    adpcm_sbpro_2          ccaption            ffv1              jv            msvideo1          pcm_zork            smackaud              vc1            y41p
    adpcm_sbpro_3          cdgraphics            ffvhuff              kgv1            mszh              pcx                smacker              vc1_cuvid            ylc
    adpcm_sbpro_4          cdxl                ffwavesynth              kmvc            mts2              pgm                smc                  vc1image            yop
    adpcm_swf          cfhd                fic                  lagarith            mvc1              pgmyuv            smvjpeg              vcr1            yuv4
    adpcm_thp          cinepak            flac              loco            mvc2              pgssub            snow              vmdaudio            zero12v
    adpcm_thp_le          clearvideo            flashsv              m101            mxpeg              pictor            sol_dpcm              vmdvideo            zerocodec
    adpcm_vima          cljr                flashsv2              mace3            nellymoser          pixlet            sonic              vmnc            zlib
    adpcm_xa          cllc                flic              mace6            nuv              pjs                sp5x              vorbis            zmbv
    adpcm_yamaha          comfortnoise            flv                  magicyuv            on2avc              png                speedhq

    Enabled encoders:
    a64multi          ass                ffv1              mjpeg            pbm              pcm_s32le_planar        prores              srt            vorbis
    a64multi5          asv1                ffvhuff              mlp            pcm_alaw          pcm_s64be            prores_aw              ssa            wavpack
    aac              asv2                flac              movtext            pcm_f32be          pcm_s64le            prores_ks              subrip            webvtt
    ac3              avrp                flashsv              mp2            pcm_f32le          pcm_s8            qtrle              sunrast            wmav1
    ac3_fixed          avui                flashsv2              mp2fixed            pcm_f64be          pcm_s8_planar            r10k              svq1            wmav2
    adpcm_adx          ayuv                flv                  mpeg1video        pcm_f64le          pcm_u16be            r210              targa            wmv1
    adpcm_g722          bmp                g723_1              mpeg2video        pcm_mulaw          pcm_u16le            ra_144              text            wmv2
    adpcm_g726          cinepak            gif                  mpeg4            pcm_s16be          pcm_u24be            rawvideo              tiff            wrapped_avframe
    adpcm_ima_qt          cljr                h261              msmpeg4v2            pcm_s16be_planar      pcm_u24le            roq                  truehd            xbm
    adpcm_ima_wav          comfortnoise            h263              msmpeg4v3            pcm_s16le          pcm_u32be            roq_dpcm              tta            xface
    adpcm_ms          dca                h263p              msvideo1            pcm_s16le_planar      pcm_u32le            rv10              utvideo            xsub
    adpcm_swf          dnxhd                h264_nvenc              nellymoser        pcm_s24be          pcm_u8            rv20              v210            xwd
    adpcm_yamaha          dpx                hevc_nvenc              nvenc            pcm_s24daud          pcx                s302m              v308            y41p
    alac              dvbsub            huffyuv              nvenc_h264        pcm_s24le          pgm                sgi                  v408            yuv4
    alias_pix          dvdsub            jpeg2000              nvenc_hevc        pcm_s24le_planar      pgmyuv            snow              v410            zlib
    amv              dvvideo            jpegls              opus            pcm_s32be          png                sonic              vc2            zmbv
    apng              eac3                ljpeg              pam            pcm_s32le          ppm                sonic_ls

    Enabled hwaccels:
    h264_cuvid          hevc_cuvid            mjpeg_cuvid              mpeg1_cuvid        mpeg2_cuvid          mpeg4_cuvid            vc1_cuvid              vp8_cuvid            vp9_cuvid

    Enabled parsers:
    aac              cavsvideo            dpx                  flac            h264              mpeg4video            png                  sipr            vp3
    aac_latm          cook                dvaudio              g729            hevc              mpegaudio            pnm                  tak            vp8
    ac3              dca                dvbsub              gsm            mjpeg              mpegvideo            rv30              vc1            vp9
    adx              dirac                dvd_nav              h261            mlp              opus                rv40              vorbis            xma
    bmp              dnxhd                dvdsub              h263

    Enabled demuxers:
    aa              bintext            epaf              image2_brender_pix    ivr              msf                pcm_u16be              sds            v210
    aac              bit                ffm                  image2pipe        jacosub              msnwc_tcp            pcm_u16le              sdx            v210x
    ac3              bmv                ffmetadata              image_bmp_pipe        jv              mtaf                pcm_u24be              segafilm            vag
    acm              boa                filmstrip              image_dds_pipe        live_flv          mtv                pcm_u24le              shorten            vc1
    act              brstm                flac              image_dpx_pipe        lmlm4              musx                pcm_u32be              siff            vc1t
    adf              c93                flic              image_exr_pipe        loas              mv                pcm_u32le              sln            vivo
    adp              caf                flv                  image_j2k_pipe        lrc              mvi                pcm_u8              smacker            vmd
    ads              cavsvideo            fourxm              image_jpeg_pipe        lvf              mxf                pjs                  smjpeg            vobsub
    adx              cdg                frm                  image_jpegls_pipe        lxf              mxg                pmp                  smush            voc
    aea              cdxl                fsb                  image_pam_pipe        m4v              nc                pva                  sol            vpk
    afc              cine                g722              image_pbm_pipe        matroska          nistsphere            pvf                  sox            vplayer
    aiff              concat            g723_1              image_pcx_pipe        mgsts              nsv                qcp                  spdif            vqf
    aix              data                g729              image_pgm_pipe        microdvd          nut                r3d                  srt            w64
    amr              daud                genh              image_pgmyuv_pipe        mjpeg              nuv                rawvideo              stl            wav
    anm              dcstr                gif                  image_pictor_pipe        mjpeg_2000          ogg                realtext              str            wc3
    apc              dfa                gsm                  image_png_pipe        mlp              oma                redspark              subviewer            webm_dash_manifest
    ape              dirac                gxf                  image_ppm_pipe        mlv              paf                rl2                  subviewer1        webvtt
    apng              dnxhd                h261              image_psd_pipe        mm              pcm_alaw            rm                  sup            wsaud
    aqtitle              dsf                h263              image_qdraw_pipe        mmf              pcm_f32be            roq                  svag            wsd
    asf              dsicin            h264              image_sgi_pipe        mov              pcm_f32le            rpl                  swf            wsvqa
    asf_o              dss                hevc              image_sunrast_pipe    mp3              pcm_f64be            rsd                  tak            wtv
    ass              dts                hls                  image_tiff_pipe        mpc              pcm_f64le            rso                  tedcaptions        wv
    ast              dtshd                hnm                  image_webp_pipe        mpc8              pcm_mulaw            rtp                  thp            wve
    au              dv                ico                  image_xpm_pipe        mpegps              pcm_s16be            rtsp              threedostr        xa
    avi              dvbsub            idcin              ingenient            mpegts              pcm_s16le            sami              tiertexseq        xbin
    avr              dvbtxt            idf                  ipmovie            mpegtsraw          pcm_s24be            sap                  tmv            xmv
    avs              dxa                iff                  ircam            mpegvideo          pcm_s24le            sbg                  truehd            xvag
    bethsoftvid          ea                ilbc              iss            mpjpeg              pcm_s32be            scc                  tta            xwma
    bfi              ea_cdata            image2              iv8            mpl2              pcm_s32le            sdp                  tty            yop
    bfstm              eac3                image2_alias_pix          ivf            mpsub              pcm_s8            sdr2              txd            yuv4mpegpipe
    bink

    Enabled muxers:
    a64              crc                framehash              image2pipe        mov              nut                pcm_s32le              rtsp            truehd
    ac3              dash                framemd5              ipod            mp2              oga                pcm_s8              sap            tta
    adts              data                g722              ircam            mp3              ogg                pcm_u16be              scc            uncodedframecrc
    adx              daud                g723_1              ismv            mp4              ogv                pcm_u16le              segment            vc1
    aiff              dirac                gif                  ivf            mpeg1system          oma                pcm_u24be              singlejpeg        vc1t
    amr              dnxhd                gsm                  jacosub            mpeg1vcd          opus                pcm_u24le              smjpeg            voc
    apng              dts                gxf                  latm            mpeg1video          pcm_alaw            pcm_u32be              smoothstreaming        w64
    asf              dv                h261              lrc            mpeg2dvd          pcm_f32be            pcm_u32le              sox            wav
    asf_stream          eac3                h263              m4v            mpeg2svcd          pcm_f32le            pcm_u8              spdif            webm
    ass              f4v                h264              matroska            mpeg2video          pcm_f64be            psp                  spx            webm_chunk
    ast              ffm                hash              matroska_audio        mpeg2vob          pcm_f64le            rawvideo              srt            webm_dash_manifest
    au              ffmetadata            hds                  md5            mpegts              pcm_mulaw            rm                  stream_segment        webp
    avi              fifo                hevc              microdvd            mpjpeg              pcm_s16be            roq                  swf            webvtt
    avm2              filmstrip            hls                  mjpeg            mxf              pcm_s16le            rso                  tee            wtv
    bit              flac                ico                  mkvtimestamp_v2        mxf_d10              pcm_s24be            rtp                  tg2            wv
    caf              flv                ilbc              mlp            mxf_opatom          pcm_s24le            rtp_mpegts              tgp            yuv4mpegpipe
    cavsvideo          framecrc            image2              mmf            null              pcm_s32be

    Enabled protocols:
    async              data                ftp                  http            md5              pipe                rtmpt              subfile            udp
    cache              ffrtmphttp            gopher              httpproxy            mmsh              prompeg            rtp                  tcp            udplite
    concat              file                hls                  icecast            mmst              rtmp                srtp              tee            unix
    crypto

    Enabled filters:
    abench              anoisesrc            bandreject              curves            fieldorder          lenscorrection        paletteuse              settb            swaprect
    abitscope          anull                bass              datascope            firequalizer          life                pan                  showcqt            swapuv
    acompressor          anullsink            bbox              dcshift            flanger              loop                perms              showfreqs            tblend
    acrossfade          anullsrc            bench              dctdnoiz            format              loudnorm            pixdesctest              showinfo            telecine
    acrusher          apad                biquad              deband            fps              lowpass            premultiply              showpalette        testsrc
    adelay              aperms            bitplanenoise          decimate            framepack          lut                prewitt              showspectrum        testsrc2
    adrawgraph          aphasemeter            blackdetect              deflate            framerate          lut2                psnr              showspectrumpic        threshold
    aecho              aphaser            blend              dejudder            framestep          lut3d                qp                  showvolume        thumbnail
    aemphasis          apulsator            bwdif              deshake            gblur              lutrgb            random              showwaves            tile
    aeval              arealtime            cellauto              detelecine        gradfun              lutyuv            readeia608              showwavespic        transpose
    aevalsrc          aresample            channelmap              dilation            haldclut          mandelbrot            readvitc              shuffleframes        treble
    afade              areverse            channelsplit          displace            haldclutsrc          maskedclamp            realtime              shuffleplanes        tremolo
    afftfilt          aselect            chorus              drawbox            hdcd              maskedmerge            remap              sidechaincompress        trim
    aformat              asendcmd            chromakey              drawgraph            hflip              mergeplanes            removegrain              sidechaingate        unsharp
    agate              asetnsamples            ciescope              drawgrid            highpass          mestimate            removelogo              sidedata            vectorscope
    ahistogram          asetpts            codecview              dynaudnorm        histogram          metadata            replaygain              signalstats        vflip
    ainterleave          asetrate            color              earwax            hqx              midequalizer            reverse              silencedetect        vibrato
    alimiter          asettb            colorbalance          ebur128            hstack              minterpolate            rgbtestsrc              silenceremove        vignette
    allpass              ashowinfo            colorchannelmixer          edgedetect        hue              movie                rotate              sine            volume
    allrgb              asidedata            colorkey              elbg            hwdownload          negate            scale              smptebars            volumedetect
    allyuv              asplit            colorlevels              equalizer            hwmap              nlmeans            scale2ref              smptehdbars        vstack
    aloop              astats            colorspace              erosion            hwupload          noformat            select              sobel            w3fdif
    alphaextract          astreamselect            compand              extractplanes        hwupload_cuda          noise                selectivecolor          spectrumsynth        waveform
    alphamerge          atadenoise            compensationdelay          extrastereo        hysteresis          null                sendcmd              split            weave
    amerge              atempo            concat              fade            idet              nullsink            separatefields          ssim            xbr
    ametadata          atrim                convolution              fftfilt            il              nullsrc            setdar              stereotools        yadif
    amix              avectorscope            copy              field            inflate              overlay            setfield              stereowiden        yuvtestsrc
    amovie              avgblur            crop              fieldhint            interleave          pad                setpts              streamselect        zoompan
    anequalizer          bandpass            crystalizer              fieldmatch        join              palettegen            setsar

    Enabled bsfs:
    aac_adtstoasc          dca_core            extract_extradata          hevc_mp4toannexb        mjpeg2jpeg          mov2textsub            mpeg4_unpack_bframes      remove_extradata        vp9_superframe
    chomp              dump_extradata        h264_mp4toannexb          imx_dump_header        mjpega_dump_header      mp3_header_decompress        noise              text2movsub

    Enabled indevs:
    dv1394              fbdev                lavfi              oss            v4l2              xcbgrab

    Enabled outdevs:
    fbdev              oss                v4l2

    License: LGPL version 2.1 or later
    Creating configuration files ...
    config.h is unchanged
    libavutil/avconfig.h is unchanged
    libavcodec/bsf_list.c is unchanged
    libavformat/protocol_list.c is unchanged


    make
    make install