Fix. mv -v /root/some.iso /tmp/some.iso
Monthly Archives: February 2015
virsh # qemu-monitor-command DOMAIN “info block”
error: internal error cannot parse json info block: lexical error: invalid char in json text.
info block
(right here) ——^
Fix:
virsh # qemu-monitor-command DOMAIN –hmp –cmd “info block”
ubuntu lamp 2 commands
sudo apt-get install tasksel
sudo tasksel install lamp-server
memtest linux
#!/bin/bash
echo "ByteOnSite Memory Test"
cpus=`cat /proc/cpuinfo | grep processor | wc -l`
if [ $cpus -lt 6 ]; then
threads=2
else
threads=$(($cpus / 2))
fi
echo "Detected $cpus CPUs, using $threads threads.."
memory=`free | grep 'Mem:' | awk {'print $2'}`
memoryper=$(($memory / $threads))
echo "Detected ${memory}K of RAM ($memoryper per thread).."
freespace=`df -B1024 . | tail -n1 | awk {'print $4'}`
if [ $freespace -le $memory ]; then
echo You do not have enough free space on the current partition. Minimum: $memory bytes
exit 1
fi
echo "Clearing RAM Cache.."
sync; echo 3 > /proc/sys/vm/drop_caches
echo > dump.memtest.img
echo "Writing to dump file (dump.memtest.img).."
for i in `seq 1 $threads`;
do
# 1044 is used in place of 1024 to ensure full RAM usage (2% over allocation)
dd if=/dev/urandom bs=$memoryper count=1044 >> dump.memtest.img 2>/dev/null &
pids[$i]=$!
echo $i
done
for pid in "${pids[@]}"
do
wait $pid
done
echo "Reading and analyzing dump file..."
echo "Pass 1.."
md51=`md5sum dump.memtest.img | awk {'print $1'}`
echo "Pass 2.."
md52=`md5sum dump.memtest.img | awk {'print $1'}`
echo "Pass 3.."
md53=`md5sum dump.memtest.img | awk {'print $1'}`
if [ "$md51" != "$md52" ]; then
fail=1
elif [ "$md51" != "$md53" ]; then
fail=1
elif [ "$md52" != "$md53" ]; then
fail=1
else
fail=0
fi
if [ $fail -eq 0 ]; then
echo "Memory test PASSED."
else
echo "Memory test FAILED. Bad memory detected."
fi
rm -f dump.memtest.img
exit $fail
dd: failed to open ‘/dev/cdrom’: No medium found
cat /proc/mounts | grep iso9660
vim install autocomplete: YouCompleteMe.git
cd .vim/bundle
git clone https://github.com/Valloric/YouCompleteMe
cd YouCompleteMe
git submodule update --init --recursive
yum install cmake gcc-c++ python-libs python-devel
./install.sh
linux check screen resolution
xrandr | grep '*'
t/05dbcreate.t ………………….. Bailout called. Further testing stopped: ERROR: Access denied for user ‘root’@’localhost’ (using password: NO)
Error: FAILED–Further testing stopped: ERROR: Access denied for user ‘root’@’localhost’ (using password: NO)
make: *** [test_dynamic] Error 255
/usr/bin/make test — NOT OK
Fix: cpan -fi DBD::mysql
munin: install_driver(mysql) failed: Can’t locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 19) line 3
Error: install_driver(mysql) failed: Can’t locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 19) line 3.
Perhaps the DBD::mysql perl module hasn’t been fully installed,
or perhaps the capitalisation of ‘mysql’ isn’t right.
Available drivers: DBM, ExampleP, File, Gofer, Pg, Proxy, Sponge.
at /etc/munin/plugins/mysql line 340
Fix: cpan -fi DBD::mysql
nginx virtual host for munin
vi /etc/nginx/conf.d/default.conf
Add to server section:
location /munin {
alias /var/www/html/munin/;
index index.html;
}
bash: add-apt-repository: command not found
apt-get install software-properties-common
linux grep help output
Ok its strange post, but yiu can’t to do this:
docker --help | grep commit
You should do in this way:
docker --help 2>&1 | grep commit, or even: 2>&1 docker | grep commit
Congrats! 1000 posts
I have post already 1000 messages about linux, somebody stop me. :))
CMake Error: CMake was unable to find a build program corresponding to “Unix Makefiles”
CMake Error: CMake was unable to find a build program corresponding to “Unix Makefiles”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
Fix: yum groups install “Development Tools”
If still error:
CMake Error at CMakeLists.txt:26 (project):
No CMAKE_CXX_COMPILER could be found.
or
Your C++ compiler supports C++11, compiling in that mode.
Downloading Clang 3.5
CMake Error at ycm/CMakeLists.txt:97 (message):
Fix. yum install gcc gcc-c++ clang
vim install vim-go
cd ~/.vim/bundle
git clone https://github.com/fatih/vim-go.git
vim ~/.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
let g:go_disable_autoinstall = 0