{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "pRQZOrAplLuo" }, "source": [ "Contributors: **Rohit Singh Rathaur, Girish L.** \n", "\n", "Copyright [2021](2021) [*Rohit Singh Rathaur, BIT Mesra and Girish L., CIT GUBBI, Karnataka*]\n", "\n", "Licensed under the Apache License, Version 2.0 (the \"License\");\n", "you may not use this file except in compliance with the License.\n", "You may obtain a copy of the License at\n", "\n", " http://www.apache.org/licenses/LICENSE-2.0\n", "\n", "Unless required by applicable law or agreed to in writing, software\n", "distributed under the License is distributed on an \"AS IS\" BASIS,\n", "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", "See the License for the specific language governing permissions and\n", "limitations under the License." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "6rUjno0va6DX" }, "outputs": [], "source": [ "#import some necessary librairies\n", "\n", "import numpy as np # linear algebra\n", "import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)<\n", "\n", "\n", "# To plot pretty figures\n", "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "plt.rcParams['axes.labelsize'] = 14\n", "plt.rcParams['xtick.labelsize'] = 12\n", "plt.rcParams['ytick.labelsize'] = 12\n", "\n", "\n", "import seaborn as sns\n", "color = sns.color_palette()\n", "sns.set_style('darkgrid')\n", "\n", "import warnings\n", "def ignore_warn(*args, **kwargs):\n", " pass\n", "warnings.warn = ignore_warn #ignore annoying warning (from sklearn and seaborn)\n", "\n", "\n", "from scipy import stats\n", "from scipy.stats import norm, skew #for some statistics\n", "\n", "\n", "pd.set_option('display.float_format', lambda x: '{:.3f}'.format(x)) #Limiting floats output to 3 decimal points\n", "\n", "\n", "from subprocess import check_output\n", "#print(check_output([\"ls\", \"../input\"]).decode(\"utf8\")) #check the files available in the directory" ] }, { "cell_type": "markdown", "metadata": { "id": "K4CRikWVbT1d" }, "source": [ "# **X.npy data /all data stored in the npy format**" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "geh5BNM3bhmT", "outputId": "0f5af44d-de19-438b-e4de-5f703c59a687" }, "outputs": [], "source": [ "from google.colab import drive\n", "drive.mount('/gdrive')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "PanwhFGBbDV7" }, "outputs": [], "source": [ "# we are here loading the all dataset and showing the all features and sort them per server\n", "X = np.load('/gdrive/MyDrive/LFN Anuket/Analysis/data/X.npy', allow_pickle=True)\n", "dframe = pd.DataFrame(data=X,columns=['ellis-cpu.idle_perc', 'ralf-load.avg_15_min', 'bono-net.in_errors_sec', 'homer-net.out_bytes_sec', 'ellis-io.write_req_sec', 'homer-mem.total_mb', 'homestead-load.avg_1_min', 'homer-load.avg_1_min', 'sprout-cpu.stolen_perc', 'ralf-cpu.idle_perc', 'sprout-io.read_req_sec', 'homestead-net.in_bytes_sec', 'homer-disk.space_used_perc', 'bono-net.out_packets_sec', 'homer-cpu.wait_perc', 'ellis-net.in_packets_sec', 'bono-mem.free_mb', 'ellis-io.read_req_sec', 'bono-mem.usable_mb', 'bono-net.in_packets_dropped_sec', 'homestead-mem.free_mb', 'homer-io.write_time_sec', 'sprout-io.write_time_sec', 'homestead-net.in_errors_sec', 'homestead-mem.usable_perc', 'homestead-net.in_packets_dropped_sec', 'homestead-io.write_req_sec', 'bono-net.in_bytes_sec', 'homestead-disk.space_used_perc', 'homer-net.out_packets_sec', 'bono-mem.usable_perc', 'ralf-net.out_errors_sec', 'homestead-load.avg_5_min', 'sprout-io.read_kbytes_sec', 'sprout-net.out_errors_sec', 'homestead-io.write_kbytes_sec', 'homestead-net.in_packets_sec', 'sprout-mem.usable_mb', 'homestead-cpu.idle_perc', 'ralf-io.write_time_sec', 'ralf-io.write_kbytes_sec', 'ralf-io.write_req_sec', 'ellis-net.out_bytes_sec', 'bono-io.read_kbytes_sec', 'bono-disk.space_used_perc', 'homer-net.in_packets_dropped_sec', 'ralf-mem.usable_mb', 'bono-load.avg_15_min', 'bono-io.read_time_sec', 'sprout-mem.usable_perc', 'bono-cpu.idle_perc', 'homer-mem.usable_perc', 'homestead-cpu.stolen_perc', 'ralf-io.read_req_sec', 'homer-cpu.idle_perc', 'homestead-mem.total_mb', 'ralf-load.avg_1_min', 'homer-io.read_kbytes_sec', 'homestead-io.read_req_sec', 'ellis-mem.free_mb', 'bono-io.write_time_sec', 'ellis-net.out_errors_sec', 'ellis-cpu.stolen_perc', 'ellis-mem.usable_perc', 'ralf-disk.inode_used_perc', 'sprout-load.avg_15_min', 'ellis-io.read_time_sec', 'ralf-net.out_packets_sec', 'sprout-io.write_req_sec', 'bono-cpu.stolen_perc', 'homestead-load.avg_15_min', 'bono-cpu.system_perc', 'homestead-net.out_packets_sec', 'ellis-io.write_kbytes_sec', 'sprout-cpu.idle_perc', 'ellis-mem.total_mb', 'homer-mem.usable_mb', 'bono-load.avg_5_min', 'ellis-load.avg_5_min', 'homer-cpu.stolen_perc', 'sprout-net.out_bytes_sec', 'homestead-mem.usable_mb', 'homestead-disk.inode_used_perc', 'ralf-net.in_packets_dropped_sec', 'sprout-io.write_kbytes_sec', 'ellis-load.avg_15_min', 'homer-load.avg_5_min', 'ralf-mem.usable_perc', 'bono-net.out_bytes_sec', 'ellis-cpu.system_perc', 'homer-io.read_time_sec', 'ellis-disk.inode_used_perc', 'homestead-io.read_time_sec', 'sprout-net.in_bytes_sec', 'bono-io.write_kbytes_sec', 'homestead-io.read_kbytes_sec', 'ellis-net.in_errors_sec', 'sprout-io.read_time_sec', 'homer-disk.inode_used_perc', 'ralf-cpu.wait_perc', 'homer-load.avg_15_min', 'sprout-load.avg_5_min', 'homer-io.read_req_sec', 'ralf-mem.total_mb', 'homer-mem.free_mb', 'homer-net.in_packets_sec', 'homestead-net.out_bytes_sec', 'sprout-disk.inode_used_perc', 'ellis-mem.usable_mb', 'homer-io.write_kbytes_sec', 'homer-net.out_errors_sec', 'homer-cpu.system_perc', 'ellis-io.read_kbytes_sec', 'sprout-load.avg_1_min', 'sprout-cpu.system_perc', 'ralf-cpu.stolen_perc', 'bono-mem.total_mb', 'bono-net.out_errors_sec', 'ellis-io.write_time_sec', 'ralf-io.read_time_sec', 'sprout-cpu.wait_perc', 'ellis-cpu.wait_perc', 'ralf-disk.space_used_perc', 'ralf-net.out_bytes_sec', 'ellis-net.in_packets_dropped_sec', 'homer-net.in_bytes_sec', 'ellis-net.in_bytes_sec', 'bono-cpu.wait_perc', 'ralf-net.in_packets_sec', 'sprout-mem.total_mb', 'ralf-net.in_bytes_sec', 'bono-load.avg_1_min', 'sprout-net.in_packets_sec', 'bono-io.write_req_sec', 'ralf-load.avg_5_min', 'ralf-net.in_errors_sec', 'bono-disk.inode_used_perc', 'homestead-io.write_time_sec', 'ellis-net.out_packets_sec', 'sprout-disk.space_used_perc', 'ralf-io.read_kbytes_sec', 'homestead-cpu.system_perc', 'sprout-mem.free_mb', 'homer-net.in_errors_sec', 'homestead-net.out_errors_sec', 'homer-io.write_req_sec', 'sprout-net.in_errors_sec', 'ellis-disk.space_used_perc', 'sprout-net.out_packets_sec', 'sprout-net.in_packets_dropped_sec', 'ralf-cpu.system_perc', 'ralf-mem.free_mb', 'bono-io.read_req_sec', 'bono-net.in_packets_sec', 'homestead-cpu.wait_perc', 'ellis-load.avg_1_min'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "nAia0RRkbcSV" }, "outputs": [], "source": [ "dframesorted = dframe.sort_index(axis=1, ascending=True, inplace=False, kind='quicksort')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 270 }, "id": "76XHMM3cfWGW", "outputId": "87965d6f-7c2a-4c39-ed9e-f372a0ade7ca" }, "outputs": [], "source": [ "dframesorted.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "lKCAS0m7fe5F" }, "outputs": [], "source": [ "#dframesorted.describe()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "vnThYldxXdaw", "outputId": "696f7fee-55eb-4d38-d471-17d1dd4e2e7e" }, "outputs": [], "source": [ "# here we print the name col to select later metrics per server. \n", "print('Column names are: ',list(dframesorted.columns))" ] }, { "cell_type": "markdown", "metadata": { "id": "8-pffUQBXojo" }, "source": [ "# **X_126bis / all data with less 30 features and csv format**\n", "cpu.stolen_perc\n", "\n", "mem.total_mb\n", "\n", "net.in_errors_sec\n", "\n", "net.in_packets_dropped_sec\n", "\n", "net.out_errors_sec" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "HE4xoUdNXgLi", "outputId": "16443f8c-111b-4023-d192-345e02c5a49f" }, "outputs": [], "source": [ "X_126bis = dframesorted.drop(['sprout-cpu.stolen_perc', 'sprout-mem.total_mb', 'sprout-net.in_errors_sec', 'sprout-net.in_packets_dropped_sec', 'sprout-net.out_errors_sec','homer-cpu.stolen_perc', 'homer-mem.total_mb', 'homer-net.in_errors_sec', 'homer-net.in_packets_dropped_sec', 'homer-net.out_errors_sec','ellis-cpu.stolen_perc', 'ellis-mem.total_mb', 'ellis-net.in_errors_sec', 'ellis-net.in_packets_dropped_sec', 'ellis-net.out_errors_sec', 'bono-cpu.stolen_perc', 'bono-mem.total_mb', 'bono-net.in_errors_sec', 'bono-net.in_packets_dropped_sec', 'bono-net.out_errors_sec', 'ralf-cpu.stolen_perc', 'ralf-mem.total_mb', 'ralf-net.in_errors_sec', 'ralf-net.in_packets_dropped_sec', 'ralf-net.out_errors_sec', 'homestead-cpu.stolen_perc', 'homestead-mem.total_mb', 'homestead-net.in_errors_sec', 'homestead-net.in_packets_dropped_sec', 'homestead-net.out_errors_sec'], axis =1)\n", "\n", "dframesorted.shape, X_126bis.shape" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "5_8LHtazXvwf" }, "outputs": [], "source": [ "X_126bis.to_csv('X_126bis.csv', sep=',')" ] }, { "cell_type": "markdown", "metadata": { "id": "sknAZgiPX6_2" }, "source": [ "# **df_Ellis.csv / extract the ellis server metrics**\n", "1) Ellis Server with 26 metrics\n", "\n", "2) subselection of the Ellis metrics" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "S6n-hPD3X43P" }, "outputs": [], "source": [ "# this function select column from the global df and create a new df with them\n", "def select_columns(data_frame, column_names):\n", " new_frame = data_frame.loc[:, column_names]\n", " return new_frame\n", "\n", "selected_columns = ['ellis-cpu.idle_perc', 'ellis-cpu.stolen_perc', 'ellis-cpu.system_perc', 'ellis-cpu.wait_perc', 'ellis-disk.inode_used_perc', 'ellis-disk.space_used_perc', 'ellis-io.read_kbytes_sec', 'ellis-io.read_req_sec', 'ellis-io.read_time_sec', 'ellis-io.write_kbytes_sec', 'ellis-io.write_req_sec', 'ellis-io.write_time_sec', 'ellis-load.avg_15_min', 'ellis-load.avg_1_min', 'ellis-load.avg_5_min', 'ellis-mem.free_mb', 'ellis-mem.total_mb', 'ellis-mem.usable_mb', 'ellis-mem.usable_perc', 'ellis-net.in_bytes_sec', 'ellis-net.in_errors_sec', 'ellis-net.in_packets_dropped_sec', 'ellis-net.in_packets_sec', 'ellis-net.out_bytes_sec', 'ellis-net.out_errors_sec', 'ellis-net.out_packets_sec']\n", "df_Ellis = select_columns(dframesorted, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 241 }, "id": "VU27zosAYA0b", "outputId": "32ed0bbb-0386-40c8-ba57-0787d3afda76" }, "outputs": [], "source": [ "df_Ellis.head()" ] }, { "cell_type": "markdown", "metadata": { "id": "0k96D8aDYFw-" }, "source": [ "# **df_Ellis_7 / focus on the main 6 metrics**" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "zVxKNXtfYCph" }, "outputs": [], "source": [ "selected_columns= ['ellis-load.avg_1_min', 'ellis-cpu.wait_perc', 'ellis-net.out_packets_sec', 'ellis-cpu.system_perc', 'ellis-net.in_bytes_sec', 'ellis-mem.free_mb']\n", "df_Ellis_7 = select_columns(df_Ellis, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "id": "7y_uHZ5TYJiD", "outputId": "5aef0247-67d8-4d19-c337-54075e096e07" }, "outputs": [], "source": [ "df_Ellis_7.to_csv('/gdrive/MyDrive/LFN Anuket/Analysis/data/New/df_Ellis.csv')\n", "df_Ellis_7.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "e9c4-7mZYLpq", "outputId": "020a0e5f-a63a-4918-db1b-a9e1081ce38e" }, "outputs": [], "source": [ "df_Ellis_7.info()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "id": "iFy_Het0cqh7", "outputId": "ad2ea7ad-1c70-4539-a558-bee07b0a8a19" }, "outputs": [], "source": [ "timestamp = pd.read_csv(\"/gdrive/MyDrive/LFN Anuket/Analysis/data/timestamp.csv\")\n", "timestamp.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "q2-Wt45vdTzt" }, "outputs": [], "source": [ "df1 = timestamp[\"Timestamp\"]\n", "df1\n", "df1.to_csv('/gdrive/MyDrive/LFN Anuket/Analysis/data/TimestampNew.csv')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "dcpx8F6ReZzb", "outputId": "7009dff8-ee1a-43ee-b990-1bfba586cce9" }, "outputs": [], "source": [ "df1.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "mybijUDWfdcH" }, "outputs": [], "source": [ "#df_Ellis_7.to_csv('/gdrive/MyDrive/LFN Anuket/Analysis/data/New/df_EllisTime.csv') " ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 419 }, "id": "2TddekZAfiad", "outputId": "be25c51a-d1c0-4da8-9838-72fb59d85369" }, "outputs": [], "source": [ "df_Ellis_7" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "7gstjLldYT_r" }, "outputs": [], "source": [ "# df_Ellis_7.describe()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "bFMkMFqhs5pm" }, "outputs": [], "source": [ "# investigate why we need this float transformation. \n", "df_Ellis_7 = df_Ellis_7.astype(np.float)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 882 }, "id": "mWxDJNMwtGYs", "outputId": "73a4a63a-4bd6-4ef0-b140-4ef299152fa2" }, "outputs": [], "source": [ "# we show here the hist\n", "df_Ellis_7.hist(bins=100,figsize=(20,15))\n", "#save_fig(\"attribute_histogram_plots\")\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "dedoBLq_tIG_" }, "outputs": [], "source": [ "df_Ellis_7.to_csv('df_Ellis_7.csv', sep=';')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "id": "sObmuXeWtLL0", "outputId": "e2bbea48-8fb3-4671-a4dc-5f9f2e464b59" }, "outputs": [], "source": [ "# we show here the boxplot\n", "plt.figure(figsize=(20,20))\n", "#df_Ellis_7.boxplot(figsize=(20,20))\n", "ax = sns.boxplot(x=\"variable\", y=\"value\", data=pd.melt(df_Ellis_7))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "wxNTLGMHtOF_" }, "outputs": [], "source": [ "# the gray related metrics will be dropped when using the df_Ellis\n", "\n", "#del df_Ellis['ellis-cpu.stolen_perc']\n", "#del df_Ellis['ellis-mem.total_mb']\n", "#del df_Ellis['ellis-net.in_errors_sec']\n", "#del df_Ellis['ellis-net.in_packets_dropped_sec']\n", "#del df_Ellis['ellis-net.out_errors_sec']" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "id": "pcmqBw0gtUT5", "outputId": "b0da529e-8895-483a-d7d1-e450fc6762e0" }, "outputs": [], "source": [ "# we establish the corrmartrice\n", "correaltionMatrice = df_Ellis_7.corr()\n", "f, ax = plt.subplots(figsize=(30, 20))\n", "sns.heatmap(correaltionMatrice, cbar=True, vmin=0, vmax=1, square=True, annot=True);\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 411 }, "id": "7yZNvlQ2tWlu", "outputId": "dc56cd65-e5e5-4179-aac9-6c6aac43c0eb" }, "outputs": [], "source": [ "mask = np.zeros_like(correaltionMatrice)\n", "mask[np.triu_indices_from(mask)] = True\n", "with sns.axes_style(\"white\"):\n", " ax = sns.heatmap(correaltionMatrice, mask=mask, vmin=0,vmax=1, square=True)\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "id": "Whxt9FahtZ6i", "outputId": "f6dd23c3-82b5-4dd1-9f18-6bd373ff9322" }, "outputs": [], "source": [ "df_Ellis_7.shape\n", "df_Ellis_7.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "id": "Tmzw5MYctb3h", "outputId": "65c21482-29fa-42e3-eb8f-50414bb9c656" }, "outputs": [], "source": [ "# we show here the scatter_matrix\n", "from pandas.plotting import scatter_matrix\n", "scatter_matrix(df_Ellis_7, alpha=0.2, figsize=(30,30))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "id": "kcMuENePteVx", "outputId": "7ed8fd61-a02c-4a01-f661-69938c0028ad" }, "outputs": [], "source": [ "# we show here the scatter_matrix (kde)\n", "\n", "scatter_matrix(df_Ellis_7, alpha=0.2, figsize=(30, 30), diagonal='kde')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "id": "thrxP0LQth88", "outputId": "d15b9169-79b7-47a0-e19f-b8477dd2b287" }, "outputs": [], "source": [ "#scatterplot the most obvious variable related to SalePrice\n", "sns.pairplot(df_Ellis_7, size = 2.5)\n", "plt.show();" ] }, { "cell_type": "markdown", "metadata": { "id": "HNMDfsExILYz" }, "source": [ "# **Bono**" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "mxaAX85otljN" }, "outputs": [], "source": [ "# this function select column from the global df and create a new df with them\n", "def select_columns(data_frame, column_names):\n", " new_frame = data_frame.loc[:, column_names]\n", " return new_frame\n", "\n", "selected_columns = ['bono-cpu.idle_perc', 'bono-cpu.stolen_perc', 'bono-cpu.system_perc', 'bono-cpu.wait_perc', 'bono-disk.inode_used_perc', 'bono-disk.space_used_perc', 'bono-io.read_kbytes_sec', 'bono-io.read_req_sec', 'bono-io.read_time_sec', 'bono-io.write_kbytes_sec', 'bono-io.write_req_sec', 'bono-io.write_time_sec', 'bono-load.avg_15_min', 'bono-load.avg_1_min', 'bono-load.avg_5_min', 'bono-mem.free_mb', 'bono-mem.total_mb', 'bono-mem.usable_mb', 'bono-mem.usable_perc', 'bono-net.in_bytes_sec', 'bono-net.in_errors_sec', 'bono-net.in_packets_dropped_sec', 'bono-net.in_packets_sec', 'bono-net.out_bytes_sec', 'bono-net.out_errors_sec', 'bono-net.out_packets_sec']\n", "df_Bono = select_columns(dframesorted, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 241 }, "id": "EKi0wnvUIlZb", "outputId": "4e7d2685-b09c-43ae-9217-d7210a253950" }, "outputs": [], "source": [ "df_Bono.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "gGCA3rWuJdQx" }, "outputs": [], "source": [ "selected_columns= ['bono-load.avg_1_min', 'bono-cpu.wait_perc', 'bono-net.out_packets_sec', 'bono-cpu.system_perc', 'bono-net.in_bytes_sec', 'bono-mem.free_mb']\n", "df_Bono_7 = select_columns(df_Bono, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "id": "9ZyhiI6AJo1Y", "outputId": "9308469b-ba98-4152-dafa-308d3b6f7b04" }, "outputs": [], "source": [ "df_Bono_7.to_csv('/gdrive/MyDrive/LFN Anuket/Analysis/data/bono/df_Bono.csv')\n", "df_Bono_7.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "4ZUXUW35J2fr", "outputId": "fc474730-e953-4f09-8633-ece4e493d9de" }, "outputs": [], "source": [ "df_Bono_7.info()" ] }, { "cell_type": "markdown", "metadata": { "id": "QeQ3_oHsJ5BN" }, "source": [ "# **Sprout**" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "gAQmKdKfJ3st" }, "outputs": [], "source": [ "# this function select column from the global df and create a new df with them\n", "def select_columns(data_frame, column_names):\n", " new_frame = data_frame.loc[:, column_names]\n", " return new_frame\n", "\n", "selected_columns = ['sprout-cpu.idle_perc', 'sprout-cpu.stolen_perc', 'sprout-cpu.system_perc', 'sprout-cpu.wait_perc', 'sprout-disk.inode_used_perc', 'sprout-disk.space_used_perc', 'sprout-io.read_kbytes_sec', 'sprout-io.read_req_sec', 'sprout-io.read_time_sec', 'sprout-io.write_kbytes_sec', 'sprout-io.write_req_sec', 'sprout-io.write_time_sec', 'sprout-load.avg_15_min', 'sprout-load.avg_1_min', 'sprout-load.avg_5_min', 'sprout-mem.free_mb', 'sprout-mem.total_mb', 'sprout-mem.usable_mb', 'sprout-mem.usable_perc', 'sprout-net.in_bytes_sec', 'sprout-net.in_errors_sec', 'sprout-net.in_packets_dropped_sec', 'sprout-net.in_packets_sec', 'sprout-net.out_bytes_sec', 'sprout-net.out_errors_sec', 'sprout-net.out_packets_sec']\n", "df_Sprout = select_columns(dframesorted, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 241 }, "id": "wjdR0R7YMOyT", "outputId": "4600cd66-0456-4da2-8723-17b5079f7f6b" }, "outputs": [], "source": [ "df_Sprout.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "6Tfi58LJMUNu" }, "outputs": [], "source": [ "selected_columns= ['sprout-load.avg_1_min', 'sprout-cpu.wait_perc', 'sprout-net.out_packets_sec', 'sprout-cpu.system_perc', 'sprout-net.in_bytes_sec', 'sprout-mem.free_mb']\n", "df_Sprout_7 = select_columns(df_Sprout, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "id": "fP5NM3VjM0Uw", "outputId": "163390b3-9ce0-406a-d9c9-88687d696c66" }, "outputs": [], "source": [ "df_Sprout_7.to_csv('/gdrive/MyDrive/LFN Anuket/Analysis/data/sprout/df_Sprout.csv')\n", "df_Sprout_7.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "Ybl5WrSYM9Q0", "outputId": "50f23729-a029-440f-dc6f-828308bb342c" }, "outputs": [], "source": [ "df_Sprout_7.info()" ] }, { "cell_type": "markdown", "metadata": { "id": "AvKCUZL5NKKz" }, "source": [ "# **Homestead**" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "EaXOAy7BNF8s" }, "outputs": [], "source": [ "# this function select column from the global df and create a new df with them\n", "def select_columns(data_frame, column_names):\n", " new_frame = data_frame.loc[:, column_names]\n", " return new_frame\n", "\n", "selected_columns = ['homestead-cpu.idle_perc', 'homestead-cpu.stolen_perc', 'homestead-cpu.system_perc', 'homestead-cpu.wait_perc', 'homestead-disk.inode_used_perc', 'homestead-disk.space_used_perc', 'homestead-io.read_kbytes_sec', 'homestead-io.read_req_sec', 'homestead-io.read_time_sec', 'homestead-io.write_kbytes_sec', 'homestead-io.write_req_sec', 'homestead-io.write_time_sec', 'homestead-load.avg_15_min', 'homestead-load.avg_1_min', 'homestead-load.avg_5_min', 'homestead-mem.free_mb', 'homestead-mem.total_mb', 'homestead-mem.usable_mb', 'homestead-mem.usable_perc', 'homestead-net.in_bytes_sec', 'homestead-net.in_errors_sec', 'homestead-net.in_packets_dropped_sec', 'homestead-net.in_packets_sec', 'homestead-net.out_bytes_sec', 'homestead-net.out_errors_sec', 'homestead-net.out_packets_sec']\n", "df_Homestead = select_columns(dframesorted, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 241 }, "id": "Qc5vd1CVNas2", "outputId": "8b6ab0c1-d15d-4545-e69b-dd39facc5915" }, "outputs": [], "source": [ "df_Homestead.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "U5e-23VDNgjS" }, "outputs": [], "source": [ "selected_columns= ['homestead-load.avg_1_min', 'homestead-cpu.wait_perc', 'homestead-net.out_packets_sec', 'homestead-cpu.system_perc', 'homestead-net.in_bytes_sec', 'homestead-mem.free_mb']\n", "df_Homestead_7 = select_columns(df_Homestead, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 221 }, "id": "03Y_KhJVNuOC", "outputId": "ab3eef43-6a18-4c61-926a-43afac19d7a5" }, "outputs": [], "source": [ "df_Homestead_7.to_csv('/gdrive/MyDrive/LFN Anuket/Analysis/data/homestead/df_Homestead.csv')\n", "df_Homestead_7.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "CVdMWcneN7ix", "outputId": "f3e00de9-f60d-44d0-ae5b-9c4eda033687" }, "outputs": [], "source": [ "df_Homestead_7.info()" ] }, { "cell_type": "markdown", "metadata": { "id": "_kw5-s7hOFN3" }, "source": [ "# **Ralf**" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "v6xYItZWOANR" }, "outputs": [], "source": [ "# this function select column from the global df and create a new df with them\n", "def select_columns(data_frame, column_names):\n", " new_frame = data_frame.loc[:, column_names]\n", " return new_frame\n", "\n", "selected_columns = ['ralf-cpu.idle_perc', 'ralf-cpu.stolen_perc', 'ralf-cpu.system_perc', 'ralf-cpu.wait_perc', 'ralf-disk.inode_used_perc', 'ralf-disk.space_used_perc', 'ralf-io.read_kbytes_sec', 'ralf-io.read_req_sec', 'ralf-io.read_time_sec', 'ralf-io.write_kbytes_sec', 'ralf-io.write_req_sec', 'ralf-io.write_time_sec', 'ralf-load.avg_15_min', 'ralf-load.avg_1_min', 'ralf-load.avg_5_min', 'ralf-mem.free_mb', 'ralf-mem.total_mb', 'ralf-mem.usable_mb', 'ralf-mem.usable_perc', 'ralf-net.in_bytes_sec', 'ralf-net.in_errors_sec', 'ralf-net.in_packets_dropped_sec', 'ralf-net.in_packets_sec', 'ralf-net.out_bytes_sec', 'ralf-net.out_errors_sec', 'ralf-net.out_packets_sec']\n", "df_Ralf = select_columns(dframesorted, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 241 }, "id": "XlYi3QBlORiI", "outputId": "6a4740f0-b2c8-4e48-9067-c17c7a267b0d" }, "outputs": [], "source": [ "df_Ralf.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "6l88CRqDOVs-" }, "outputs": [], "source": [ "selected_columns= ['ralf-load.avg_1_min', 'ralf-cpu.wait_perc', 'ralf-net.out_packets_sec', 'ralf-cpu.system_perc', 'ralf-net.in_bytes_sec', 'ralf-mem.free_mb']\n", "df_Ralf_7 = select_columns(df_Ralf, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "id": "u3v26LoiOi5L", "outputId": "441d54ec-a644-446e-dc5b-e7ad5ec58456" }, "outputs": [], "source": [ "df_Ralf_7.to_csv('/gdrive/MyDrive/LFN Anuket/Analysis/data/ralf/df_Ralf.csv')\n", "df_Ralf_7.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "mR7Fg1w8OtnU", "outputId": "141c6b09-3c69-45cc-e723-728e1f0e8e68" }, "outputs": [], "source": [ "df_Ralf_7.info()" ] }, { "cell_type": "markdown", "metadata": { "id": "2-udEbTHO-HS" }, "source": [ "# **Homer**" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "vVpG5lJiOyYw" }, "outputs": [], "source": [ "# this function select column from the global df and create a new df with them\n", "def select_columns(data_frame, column_names):\n", " new_frame = data_frame.loc[:, column_names]\n", " return new_frame\n", "\n", "selected_columns = ['homer-cpu.idle_perc', 'homer-cpu.stolen_perc', 'homer-cpu.system_perc', 'homer-cpu.wait_perc', 'homer-disk.inode_used_perc', 'homer-disk.space_used_perc', 'homer-io.read_kbytes_sec', 'homer-io.read_req_sec', 'homer-io.read_time_sec', 'homer-io.write_kbytes_sec', 'homer-io.write_req_sec', 'homer-io.write_time_sec', 'homer-load.avg_15_min', 'homer-load.avg_1_min', 'homer-load.avg_5_min', 'homer-mem.free_mb', 'homer-mem.total_mb', 'homer-mem.usable_mb', 'homer-mem.usable_perc', 'homer-net.in_bytes_sec', 'homer-net.in_errors_sec', 'homer-net.in_packets_dropped_sec', 'homer-net.in_packets_sec', 'homer-net.out_bytes_sec', 'homer-net.out_errors_sec', 'homer-net.out_packets_sec']\n", "df_Homer = select_columns(dframesorted, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 241 }, "id": "cwMKYQWUPKpl", "outputId": "ca108468-0c41-4f44-aef0-8c63239c9fd5" }, "outputs": [], "source": [ "df_Homer.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "rsUb47imPOyE" }, "outputs": [], "source": [ "selected_columns= ['homer-load.avg_1_min', 'homer-cpu.wait_perc', 'homer-net.out_packets_sec', 'homer-cpu.system_perc', 'homer-net.in_bytes_sec', 'homer-mem.free_mb']\n", "df_Homer_7 = select_columns(df_Homer, selected_columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "id": "VZw7WV7tPd9i", "outputId": "39dc88dd-eb89-45b0-a0d3-f261aab6bbd1" }, "outputs": [], "source": [ "df_Homer_7.to_csv('/gdrive/MyDrive/LFN Anuket/Analysis/data/homer/df_Homer.csv')\n", "df_Homer_7.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "E1Cqq8V3PnEv", "outputId": "9a80be17-5bb5-4f8d-a61c-d3206e730309" }, "outputs": [], "source": [ "df_Homer_7.info()" ] } ], "metadata": { "colab": { "name": "vIMS_Visualization.ipynb", "provenance": [] }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.7" } }, "nbformat": 4, "nbformat_minor": 1 }