sync; dd if=/dev/zero of=/tempfile bs=1M count=4096; sync && dd if=/tempfile of=/dev/null bs=1M count=4096 && /sbin/sysctl -w vm.drop_caches=3 && dd if=/tempfile of=/dev/null bs=1M count=4096 4096+0 records in 4096+0 records out 4294967296 bytes (4.3 GB) copied, 112.806 s, 38.1 MB/s 4096+0 records in 4096+0 records out 4294967296 bytes (4.3 GB) copied, 52.036 s, 82.5 MB/s vm.drop_caches = 3 4096+0 records in 4096+0 records out 4294967296 bytes (4.3 GB) copied, 52.7394 s, 81.4 MB/s
// Using PDO_MySQL (connecting from App Engine) $db = new pdo('mysql:unix_socket=/cloudsql/< ID>:< Cloud SQL>'), 'root', // username '' // password ); // Using mysqli (connecting from App Engine) $sql = new mysqli( null, // host 'root', // username '', // password '', // database name null, '/cloudsql/< ID>:< Cloud SQL>' ); // Using MySQL API (connecting from APp Engine) $conn = mysql_connect(':/cloudsql/< ID>:< Cloud SQL>, 'root', // username '' // password );
gsutil Usage: gsutil [-D] [-DD] [-h header]... [-m] [-o] [-q] [command [opts...] args...]
gcloud components update
root@host:~# gcloud auth login You are running on a GCE VM. It is recommended that you use service accounts for authentication. You can run: $ gcloud config set account ``ACCOUNT'' to switch accounts if necessary. Your credentials may be visible to others with access to this virtual machine. Are you sure you want to authenticate with your personal account? Do you want to continue (Y/n)? y Go to the following link in your browser: https://accounts.google.com/o/oauth2/auth? Enter verification code:
:~# gsutil ls gs://storage/ Bucket gsutil mb CommandException: The mb command requires at least 1 argument. Usage: gsutil mb [-c class] [-l location] [-p proj_id] uri.. :~# gsutil ls gs://storage/ gs://storage/gcsfs_0.15-1_amd64.deb
gsutil rsync -d -r gs://zp-storage/ /usr/src
aptitude install mpi-default-bin mpi-default-dev libboost-all-dev povray libxml++2.6-2 libxml++2.6-dev libfuse-dev libfuse
nano /etc/gcsfs.conf bucket_name=< bucket-> service=google-storage gs_token_file=/etc/gs.token touch /etc/gs.token gcsfs_gs_get_token /etc/gs.token
:/etc# /usr/bin/gcsfs Usage: gcsfs [options] <mountpoint> Options: -f stay in the foreground (ie, do not daemonize) -h, --help print this help message and exit -o OPT... pass OPT (comma-separated) to FUSE, such as: allow_other allow other users to access the mounted file system allow_root allow root to access the mounted file system default_permissions enforce permissions (useful in multiuser scenarios) gid=<id> force group ID for all files to <id> config=<file> use <file> rather than the default configuration file uid=<id> force user ID for all files to <id> -v, --verbose enable logging to stderr (can be repeated for more verbosity) -vN, --verbose=N set verbosity to N -V, --version print version and exit
/usr/bin/gcsfs -o allow_other /<>
Source: https://habr.com/ru/post/252799/
All Articles