diff --git a/service/src/graph.c b/service/src/graph.c
index 6f6e82e..e0a31b6 100644
--- a/service/src/graph.c
+++ b/service/src/graph.c
@@ -81,6 +81,7 @@
 }module_info_link_list_t;
 
 static char acdb_path[ACDB_PATH_MAX_LENGTH];
+static void print_graph_alias(const struct agm_meta_data_gsl *meta_data_kv);
 
 static int get_acdb_files_from_directory(const char* acdb_files_path,
                                          struct gsl_acdb_data_files *data_files)
@@ -508,6 +509,7 @@
     }
 
     metadata_print(meta_data_kv);
+    print_graph_alias(meta_data_kv);
 
     list_init(&graph_obj->tagged_mod_list);
     pthread_mutex_init(&graph_obj->lock, (const pthread_mutexattr_t *)NULL);
@@ -1229,6 +1231,7 @@
     add_graph.cal_key_vect.kvp = (struct gsl_key_value_pair *)
                                      meta_data_kv->ckv.kv;
     metadata_print(meta_data_kv);
+    print_graph_alias(meta_data_kv);
     ret = gsl_ioctl(graph_obj->graph_handle, GSL_CMD_ADD_GRAPH, &add_graph,
                     sizeof(struct gsl_cmd_graph_select));
     if (ret != 0) {
@@ -1461,6 +1464,7 @@
     change_graph.cal_key_vect.kvp = (struct gsl_key_value_pair *)
                                      meta_data_kv->ckv.kv;
     metadata_print(meta_data_kv);
+    print_graph_alias(meta_data_kv);
     ret = gsl_ioctl(graph_obj->graph_handle, GSL_CMD_CHANGE_GRAPH, &change_graph,
                     sizeof(struct gsl_cmd_graph_select));
     if (ret != 0) {
@@ -1508,6 +1512,7 @@
     rm_graph.graph_key_vector.kvp = (struct gsl_key_value_pair *)
                                      meta_data_kv->gkv.kv;
     metadata_print(meta_data_kv);
+    print_graph_alias(meta_data_kv);
     ret = gsl_ioctl(graph_obj->graph_handle, GSL_CMD_REMOVE_GRAPH, &rm_graph,
                     sizeof(struct gsl_cmd_remove_graph));
     if (ret != 0) {
@@ -1982,3 +1987,22 @@
     }
     return ret;
 }
+
+static void print_graph_alias(const struct agm_meta_data_gsl *meta_data_kv)
+{
+    uint32_t acdb_string_len = 255;
+    char acdb_string [255] = {0};
+    int ret = AR_EOK;
+
+    if (meta_data_kv->gkv.num_kvs == 0) {
+        AGM_LOGD("print_graph_alias: No GKV pairs in meta_data");
+        return;
+    }
+
+    ret = gsl_get_graph_alias(&meta_data_kv->gkv, acdb_string, &acdb_string_len);
+    if (ret) {
+        AGM_LOGD("gsl_get_graph_alias failed: ret = %d\n", ret);
+        return;
+    }
+    AGM_LOGD("GKV Alias %s\n", acdb_string);
+}
