Skip to content

Instantly share code, notes, and snippets.

----system---- ---load-avg--- --total-cpu-usage-- -dsk/total- -net/total- ---paging-- ---system-- ------memory-usage----- ---procs---
time | 1m 5m 15m |usr sys idl wai stl| read writ| recv send| in out | int csw | used free buff cach|run blk new
31-08 23:11:44|0.25 0.53 1.32| 2 0 98 0 0| 35k 409k| 0 0 | 0 0 | 353 1265 |2720M 7430M 461M 2302M|2.0 1.0 0.3
31-08 23:11:45|0.23 0.52 1.31| 1 1 97 1 0|8192B 5048k| 0 0 | 0 0 |1107 2927 |2715M 7435M 462M 2301M| 0 0 0
31-08 23:11:46|0.23 0.52 1.31| 0 0 100 0 0| 0 1884k| 0 0 | 0 0 | 128 452 |2714M 7435M 462M 2301M| 0 0 0
31-08 23:11:47|0.23 0.52 1.31| 0 0 100 0 0| 0 0 | 0 0 | 0 0 | 80 403 |2714M 7435M 462M 2301M| 0 0 0
31-08 23:11:48|0.23 0.52 1.31| 0 1 99 0 0| 0 20k| 0 0 | 0 0 | 101 533 |2716M 7434M 462M 2301M| 0 0 0
31-08 23:11:49|0.23 0.52 1.31| 4 1 96 0 0| 0 1996k| 0 0 | 0 0 |
----system---- ---load-avg--- --total-cpu-usage-- -dsk/total- -net/total- ---paging-- ---system-- ------memory-usage----- ---procs---
 time | 1m   5m  15m |usr sys idl wai stl| read  writ| recv  send| in   out | int   csw | used  free  buff  cach|run blk new
31-08 22:59:13|0.59 1.34 1.77| 2  0  98  0  0
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 10 columns, instead of 9 in line 5.
cnt sum min avg max sumLock sumRows avgRows db digest
2652 49.9726991 0.0002634 0.0188434 0.5659351 9.04831 0 0.0000 isucondition INSERT INTO `isu_condition` ( `jia_isu_uuid` , `timestamp` , `is_sitting` , `condition` , `message` ) VALUES (...) /* , ... */
38616 23.6343877 0.0001812 0.000612036 0.0238742 3.517377 770877 19.9626 isucondition SELECT * FROM `isu_condition` WHERE `jia_isu_uuid` = ? AND `timestamp` < ? ORDER BY `timestamp` DESC LIMIT ?
22043 7.8235772 0.0001151 0.000354923 0.0676955 1.608543 21699 0.9844 isucondition SELECT `jia_isu_uuid` , `timestamp` , `is_sitting` , `condition` , `condition_level` , `message` FROM `isu_condition` WHERE `jia_isu_uuid` = ? ORDER BY `timestamp` DESC LIMIT ?
4277 5.5938873 0.0001583 0.001307899 0.0202111 0.402669 1463878 342.2675 isucondition SELECT `timestamp` , `condition` , `is_sitting` FROM `isu_condition` WHERE `jia_isu_uuid` = ? AND `timestamp` BETWEEN ? AND ? ORDER BY `timestamp` ASC
13317 4.8538362 0.0001058 0.000364484 0.0196072 0.914678 13141 0.9868 i
@matsuu
matsuu / Vagrantfile
Created August 22, 2021 13:17
ISUCON11予選の試作Vagrantfile(bench周りがまだ動かない)
# -*- mode: ruby -*-
# vi: set ft=ruby :
box = "ubuntu/focal64"
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
package main
// queryが途中で途切れる場合は performance_schema_max_sql_text_length を引き上げる
// https://dev.mysql.com/doc/refman/8.0/en/performance-schema-system-variables.html#sysvar_performance_schema_max_sql_text_length
import (
"context"
"database/sql"
"encoding/csv"
"flag"
@matsuu
matsuu / .tmux.conf
Last active June 20, 2023 12:19
xxh configuration
# ~/.xxh/.xxh/plugins/xxh-plugin-prerun-dotfiles/home/.tmux.conf
set-window-option -g mode-keys vi
set-window-option -g automatic-rename off
set-option -g default-terminal "screen-256color"
set-option -g pane-active-border-style fg=red
@matsuu
matsuu / Vagrantfile
Created May 15, 2021 12:30
isucon9-final
# -*- mode: ruby -*-
# vi: set ft=ruby :
box = "ubuntu/bionic64"
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
@matsuu
matsuu / exclude.ovpn
Last active April 26, 2021 04:50
openvpn ビデオチャット系IPアドレス帯除外設定
# Discord Japan
route 103.194.164.0 255.255.252.0 net_gateway
# Google Meet
# https://support.google.com/a/answer/1279090
route 74.125.250.0 255.255.255.0 net_gateway
# Skype/Teams
# https://docs.microsoft.com/ja-jp/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide#skype-for-business-online-and-microsoft-teams
@matsuu
matsuu / build.sh
Last active April 24, 2021 22:37
isucon10-qualify provisioning script
#!/bin/sh
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends ansible git
GITDIR="/tmp/isucon10-qualify-base"
rm -rf ${GITDIR}
git clone https://github.com/isucon/isucon10-qualify.git ${GITDIR}
@matsuu
matsuu / goldrush.yml
Last active February 24, 2021 11:15
Github Actions Workflow for HighLoad Cup 2021
name: Build and Publish Docker for HighLoad Cup 2021
on:
push:
branches:
- main
- master
jobs:
docker: