Skip to content

Instantly share code, notes, and snippets.

soudai sone soudai

Block or report user

Report or block soudai

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@soudai
soudai / metadata-rpm-packages.php
Last active Jun 4, 2017
yumのインストールパッケージを雑にmackerelのmetadataとして登録する
View metadata-rpm-packages.php
<?php
$list = explode("\n", `yum list installed`);
foreach ($list as $key => $val) {
if (empty($val)) {
continue;
}
$base_list = array_filter(explode(" ", $val));
$json_base[$key]['name'] = array_shift($base_list);
You can’t perform that action at this time.